fix: an issue where the @ command could not be used correctly in other workspaces and ensured cross-platform compatibility.
This commit is contained in:
@@ -2,6 +2,9 @@
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
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"
|
cd "$ROOT_DIR"
|
||||||
|
|
||||||
# Force recovery CLI (simple readline REPL, no Ink TUI)
|
# Force recovery CLI (simple readline REPL, no Ink TUI)
|
||||||
|
|||||||
@@ -15,3 +15,7 @@ Object.assign(globalThis, {
|
|||||||
ISSUES_EXPLAINER: '',
|
ISSUES_EXPLAINER: '',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
// Switch to the current workspace
|
||||||
|
if (process.env.CALLER_DIR) {
|
||||||
|
process.chdir(process.env.CALLER_DIR);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user