From 248bb9f7b6cc0d2e74de6326da1a4388295c71a8 Mon Sep 17 00:00:00 2001 From: Sander Declerck Date: Wed, 23 Jul 2025 11:19:53 +0200 Subject: [PATCH] Take environment path separators into account when getting the target dir --- src/shell-integration/setup.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/shell-integration/setup.js b/src/shell-integration/setup.js index 999f3d2..9339ef5 100644 --- a/src/shell-integration/setup.js +++ b/src/shell-integration/setup.js @@ -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 }); }