Fix WIndows shell + unit tests

This commit is contained in:
Reinier Criel 2026-04-10 14:27:55 -07:00
parent 1aef941d1c
commit 32c95dbb9d
14 changed files with 289 additions and 43 deletions

View file

@ -88,19 +88,41 @@ function getStartupFile() {
}
function getManualTeardownInstructions() {
return [
const customDir = getSafeChainDir();
const instructions = [
`Remove the following line from your PowerShell profile (run "echo $PROFILE" to find its location):`,
` . "$HOME\\.safe-chain\\scripts\\init-pwsh.ps1"`,
`Then restart your terminal or run: . $PROFILE`,
];
if (customDir) {
instructions.push(
` $env:SAFE_CHAIN_DIR = '${customDir}'`,
` . "${path.join(getScriptsDir(), "init-pwsh.ps1")}"`,
);
} else {
instructions.push(` . "$HOME\\.safe-chain\\scripts\\init-pwsh.ps1"`);
}
instructions.push(`Then restart your terminal or run: . $PROFILE`);
return instructions;
}
function getManualSetupInstructions() {
return [
const customDir = getSafeChainDir();
const instructions = [
`Add the following line to your PowerShell profile (run "echo $PROFILE" to find its location):`,
` . "$HOME\\.safe-chain\\scripts\\init-pwsh.ps1"`,
`Then restart your terminal or run: . $PROFILE`,
];
if (customDir) {
instructions.push(
` $env:SAFE_CHAIN_DIR = '${customDir}'`,
` . "${path.join(getScriptsDir(), "init-pwsh.ps1")}"`,
);
} else {
instructions.push(` . "$HOME\\.safe-chain\\scripts\\init-pwsh.ps1"`);
}
instructions.push(`Then restart your terminal or run: . $PROFILE`);
return instructions;
}
/**