mirror of
https://github.com/NanmiCoder/cc-haha
synced 2026-07-15 12:53:31 +08:00
fix: an issue where the @ command could not be used correctly in other workspaces and ensured cross-platform compatibility.
This commit is contained in:
parent
55a210a2f7
commit
c81decb9b9
@ -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)
|
||||
|
||||
@ -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);
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user