mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Some more cleanup
This commit is contained in:
parent
ccd595fc22
commit
98dcda78da
5 changed files with 40 additions and 94 deletions
|
|
@ -87,11 +87,10 @@ function getStartupFile() {
|
|||
}
|
||||
}
|
||||
|
||||
function getManualTeardownInstructions() {
|
||||
/** @param {string} preamble */
|
||||
function buildManualInstructions(preamble) {
|
||||
const customDir = getSafeChainDir();
|
||||
const instructions = [
|
||||
`Remove the following line from your PowerShell profile (run "echo $PROFILE" to find its location):`,
|
||||
];
|
||||
const instructions = [preamble];
|
||||
|
||||
if (customDir) {
|
||||
instructions.push(
|
||||
|
|
@ -106,23 +105,12 @@ function getManualTeardownInstructions() {
|
|||
return instructions;
|
||||
}
|
||||
|
||||
function getManualTeardownInstructions() {
|
||||
return buildManualInstructions(`Remove the following line from your PowerShell profile (run "echo $PROFILE" to find its location):`);
|
||||
}
|
||||
|
||||
function getManualSetupInstructions() {
|
||||
const customDir = getSafeChainDir();
|
||||
const instructions = [
|
||||
`Add the following line to your PowerShell profile (run "echo $PROFILE" to find its location):`,
|
||||
];
|
||||
|
||||
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;
|
||||
return buildManualInstructions(`Add the following line to your PowerShell profile (run "echo $PROFILE" to find its location):`);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue