mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Cleanup
This commit is contained in:
parent
1cf8fd1241
commit
d064d46668
32 changed files with 429 additions and 400 deletions
|
|
@ -3,8 +3,7 @@ import * as os from "os";
|
|||
import fs from "fs";
|
||||
import path from "path";
|
||||
import { ECOSYSTEM_JS, ECOSYSTEM_PY } from "../config/settings.js";
|
||||
import { getSafeChainDir } from "../config/environmentVariables.js";
|
||||
export { getSafeChainDir };
|
||||
import { getSafeChainBaseDir } from "../config/safeChainDir.js";
|
||||
import { safeSpawn } from "../utils/safeSpawn.js";
|
||||
import { ui } from "../environment/userInteraction.js";
|
||||
|
||||
|
|
@ -125,12 +124,10 @@ export function getPackageManagerList() {
|
|||
|
||||
/**
|
||||
* Returns the safe-chain base directory.
|
||||
* Uses SAFE_CHAIN_DIR environment variable when set, otherwise defaults to ~/.safe-chain.
|
||||
* Uses the packaged binary location when available, otherwise defaults to ~/.safe-chain.
|
||||
* @returns {string}
|
||||
*/
|
||||
export function getSafeChainBaseDir() {
|
||||
return getSafeChainDir() ?? path.join(os.homedir(), ".safe-chain");
|
||||
}
|
||||
export { getSafeChainBaseDir };
|
||||
|
||||
/**
|
||||
* @returns {string}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue