mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Some cleanup
This commit is contained in:
parent
24af6f21eb
commit
b0f392522b
19 changed files with 286 additions and 8 deletions
|
|
@ -3,6 +3,7 @@ import {
|
|||
doesExecutableExistOnSystem,
|
||||
removeLinesMatchingPattern,
|
||||
getScriptsDir,
|
||||
getSafeChainDir,
|
||||
} from "../helpers.js";
|
||||
import { execSync } from "child_process";
|
||||
import path from "path";
|
||||
|
|
@ -40,12 +41,27 @@ function teardown(tools) {
|
|||
eol
|
||||
);
|
||||
|
||||
removeLinesMatchingPattern(
|
||||
startupFile,
|
||||
/^set\s+-gx\s+SAFE_CHAIN_DIR\s+.*#\s*Safe-chain/,
|
||||
eol
|
||||
);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function setup() {
|
||||
const startupFile = getStartupFile();
|
||||
|
||||
const customDir = getSafeChainDir();
|
||||
if (customDir) {
|
||||
addLineToFile(
|
||||
startupFile,
|
||||
`set -gx SAFE_CHAIN_DIR "${customDir}" # Safe-chain installation directory`,
|
||||
eol
|
||||
);
|
||||
}
|
||||
|
||||
addLineToFile(
|
||||
startupFile,
|
||||
`source ${path.join(getScriptsDir(), "init-fish.fish")} # Safe-chain Fish initialization script`,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue