mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 20:20:49 +00:00
Take environment path separators into account when getting the target dir
This commit is contained in:
parent
eba1e9cc8e
commit
248bb9f7b6
1 changed files with 1 additions and 2 deletions
|
|
@ -84,10 +84,9 @@ function copyStartupFiles() {
|
|||
const startupFiles = ["init-posix.sh"];
|
||||
|
||||
for (const file of startupFiles) {
|
||||
const targetDir = path.join(os.homedir(), ".safe-chain", "scripts");
|
||||
const targetPath = path.join(os.homedir(), ".safe-chain", "scripts", file);
|
||||
|
||||
// Create target directory if it doesn't exist
|
||||
const targetDir = targetPath.substring(0, targetPath.lastIndexOf("/"));
|
||||
if (!fs.existsSync(targetDir)) {
|
||||
fs.mkdirSync(targetDir, { recursive: true });
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue