From 7cf626d86870dfd7584e93f13add4b84a6c45b1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ali=20F=C4=B1rat=20G=C3=BCler?= Date: Sun, 10 Nov 2019 22:12:59 +0300 Subject: [PATCH] path problem fixed --- index.js | 4 ++-- install.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 12dc10a..cd3fdf3 100755 --- a/index.js +++ b/index.js @@ -34,7 +34,7 @@ executor.linux = function (image, { c, p, a }) { if(p) args.push('-p', p); if(Array.isArray(a)) args.push(...a); - args.push(image); + args.push(`"${image}"`); return exec(args.join(' '), options); } @@ -54,7 +54,7 @@ executor.windows = function (image, { c, p, a }) { if (p) args.push('-p', p); if (Array.isArray(a)) args.push(...a); - args.push(image); + args.push(`"${image}"`); return exec(args.join(' '), options); } diff --git a/install.js b/install.js index a990377..8d8b582 100755 --- a/install.js +++ b/install.js @@ -31,7 +31,7 @@ async function install(){ new AdmZip(path.join(__dirname, 'bin.zip')).extractAllTo(__dirname, true); if (supos[os.platform()] === 'linux') { - let { stderr } = await exec('chmod 777 -R ./', { cwd: __dirname }); + let { stderr } = await exec(`chmod 777 -R "${__dirname}"`); if(stderr) throw new Error(stderr); }