Merge pull request #37 from houseyyyy/main

fix: an issue where the @ command could not be used correctly in other workspaces and ensured cross-platform compatibility.
This commit is contained in:
程序员阿江-Relakkes 2026-04-04 17:47:02 +08:00 committed by GitHub
commit 28f3a22ef9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 0 deletions

View File

@ -2,6 +2,9 @@
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
#Get your current working directory and export it as an environment variable.
export CALLER_DIR="$(pwd -W 2>/dev/null || pwd)"
cd "$ROOT_DIR"
# Force recovery CLI (simple readline REPL, no Ink TUI)

View File

@ -15,3 +15,7 @@ Object.assign(globalThis, {
ISSUES_EXPLAINER: '',
},
});
// Switch to the current workspace
if (process.env.CALLER_DIR) {
process.chdir(process.env.CALLER_DIR);
}