Add manual setup and teardown instructions on failure

This commit is contained in:
Sander Declerck 2026-03-26 13:36:20 +01:00
parent d29edc4c36
commit 50a931cf4d
No known key found for this signature in database
8 changed files with 106 additions and 4 deletions

View file

@ -123,6 +123,22 @@ function cygpathw(path) {
}
}
function getManualTeardownInstructions() {
return [
`Remove the following line from your ~/.bashrc file:`,
` source ~/.safe-chain/scripts/init-posix.sh`,
`Then restart your terminal or run: source ~/.bashrc`,
];
}
function getManualSetupInstructions() {
return [
`Add the following line to your ~/.bashrc file:`,
` source ~/.safe-chain/scripts/init-posix.sh`,
`Then restart your terminal or run: source ~/.bashrc`,
];
}
/**
* @type {import("../shellDetection.js").Shell}
*/
@ -131,4 +147,6 @@ export default {
isInstalled,
setup,
teardown,
getManualSetupInstructions,
getManualTeardownInstructions,
};

View file

@ -66,6 +66,22 @@ function getStartupFile() {
}
}
function getManualTeardownInstructions() {
return [
`Remove the following line from your ~/.config/fish/config.fish file:`,
` source ~/.safe-chain/scripts/init-fish.fish`,
`Then restart your terminal or run: source ~/.config/fish/config.fish`,
];
}
function getManualSetupInstructions() {
return [
`Add the following line to your ~/.config/fish/config.fish file:`,
` source ~/.safe-chain/scripts/init-fish.fish`,
`Then restart your terminal or run: source ~/.config/fish/config.fish`,
];
}
/**
* @type {import("../shellDetection.js").Shell}
*/
@ -74,4 +90,6 @@ export default {
isInstalled,
setup,
teardown,
getManualSetupInstructions,
getManualTeardownInstructions,
};

View file

@ -71,6 +71,22 @@ function getStartupFile() {
}
}
function getManualTeardownInstructions() {
return [
`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`,
];
}
function getManualSetupInstructions() {
return [
`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`,
];
}
/**
* @type {import("../shellDetection.js").Shell}
*/
@ -79,4 +95,6 @@ export default {
isInstalled,
setup,
teardown,
getManualSetupInstructions,
getManualTeardownInstructions,
};

View file

@ -71,6 +71,22 @@ function getStartupFile() {
}
}
function getManualTeardownInstructions() {
return [
`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`,
];
}
function getManualSetupInstructions() {
return [
`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`,
];
}
/**
* @type {import("../shellDetection.js").Shell}
*/
@ -79,4 +95,6 @@ export default {
isInstalled,
setup,
teardown,
getManualSetupInstructions,
getManualTeardownInstructions,
};

View file

@ -66,9 +66,27 @@ function getStartupFile() {
}
}
function getManualTeardownInstructions() {
return [
`Remove the following line from your ~/.zshrc file:`,
` source ~/.safe-chain/scripts/init-posix.sh`,
`Then restart your terminal or run: source ~/.zshrc`,
];
}
function getManualSetupInstructions() {
return [
`Add the following line to your ~/.zshrc file:`,
` source ~/.safe-chain/scripts/init-posix.sh`,
`Then restart your terminal or run: source ~/.zshrc`,
];
}
export default {
name: shellName,
isInstalled,
setup,
teardown,
getManualSetupInstructions,
getManualTeardownInstructions,
};