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 path from "path";
|
|||
import os from "os";
|
||||
import { ui } from "../environment/userInteraction.js";
|
||||
import { getEcoSystem } from "./settings.js";
|
||||
import { getSafeChainDir } from "./environmentVariables.js";
|
||||
|
||||
/**
|
||||
* @typedef {Object} SafeChainConfig
|
||||
|
|
@ -304,8 +305,7 @@ function getConfigFilePath() {
|
|||
* @returns {string}
|
||||
*/
|
||||
export function getSafeChainDirectory() {
|
||||
const homeDir = os.homedir();
|
||||
const safeChainDir = path.join(homeDir, ".safe-chain");
|
||||
const safeChainDir = getSafeChainDir() ?? path.join(os.homedir(), ".safe-chain");
|
||||
|
||||
if (!fs.existsSync(safeChainDir)) {
|
||||
fs.mkdirSync(safeChainDir, { recursive: true });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue