[PR #10] [MERGED] fix: resolve paths relative to package directory, not CWD #42

Closed
opened 2026-10-18 21:13:44 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/terminals/pull/10
Author: @james-westbrook
Created: 3/26/2026
Status: ✅ Merged
Merged: 3/27/2026
Merged by: @tjbck

Base: main ← Head: fix-relative-paths


📝 Commits (1)

  • 41858c9 fix: remove relative imports

📊 Changes

2 files changed (+16 additions, -6 deletions)

View changed files

📝 terminals/cli.py (+7 -4)
📝 terminals/config.py (+9 -2)

📄 Description

Description

database_url, data_dir, and script_location all used relative paths (./data/..., migrations), so the server only worked when launched from terminals/terminals/. Running terminals serve from the repo root or any other directory would silently fail to find migrations or write the DB to an unexpected location.

Defaults now resolve relative to the package directory so behavior is consistent regardless of CWD.

N/A


Contributor License Agreement

Note

Deleting the CLA section will lead to immediate closure of your PR and it will not be merged in.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/terminals/pull/10 **Author:** [@james-westbrook](https://github.com/james-westbrook) **Created:** 3/26/2026 **Status:** ✅ Merged **Merged:** 3/27/2026 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `main` ← **Head:** `fix-relative-paths` --- ### 📝 Commits (1) - [`41858c9`](https://github.com/open-webui/terminals/commit/41858c9e7fc5dedc5412302d036edbfb7afaa3cf) fix: remove relative imports ### 📊 Changes **2 files changed** (+16 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `terminals/cli.py` (+7 -4) 📝 `terminals/config.py` (+9 -2) </details> ### 📄 Description ## Description `database_url`, `data_dir`, and `script_location` all used relative paths (`./data/...`, `migrations`), so the server only worked when launched from `terminals/terminals/`. Running `terminals serve` from the repo root or any other directory would silently fail to find migrations or write the DB to an unexpected location. Defaults now resolve relative to the package directory so behavior is consistent regardless of CWD. ## Related Issues N/A --- ## Contributor License Agreement <!-- 🚨 DO NOT DELETE THE TEXT BELOW 🚨 Keep the "Contributor License Agreement" confirmation text intact. Deleting it will trigger the CLA-Bot to INVALIDATE your PR. Your PR will NOT be reviewed or merged until you check the box below confirming that you have read and agree to the terms of the CLA. --> - [x] By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](./CLA.md), and I am providing my contributions under its terms. > [!NOTE] > Deleting the CLA section will lead to immediate closure of your PR and it will not be merged in. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-18 21:13:44 +00:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
open-webui/terminals#42
No description provided.