Skip to content

Commit ebafe1e

Browse files
jrichter1dgolovin
authored andcommitted
Support spaces on mac, fixes #999
1 parent 550f747 commit ebafe1e

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

browser/services/platform.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ class Platform {
209209
return Promise.resolve();
210210
},
211211
default: ()=> {
212-
return pify(child_process.exec)(`chmod +x ${file}`);
212+
return pify(child_process.exec)(`chmod +x '${file}'`);
213213
}
214214
});
215215
}
@@ -255,7 +255,7 @@ class Platform {
255255
let commands = [];
256256
executables.forEach(function(executable) {
257257
let name = path.parse(executable).name;
258-
commands.push(`rm -f /usr/local/bin/${name}; ln -s ${executable} /usr/local/bin/${name};`);
258+
commands.push(`rm -f /usr/local/bin/${name}; ln -s '${executable}' /usr/local/bin/${name};`);
259259
});
260260
let osaScript = [
261261
'osascript',

test/unit/model/cdk-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,8 +367,8 @@ describe('CDK installer', function() {
367367
return new Promise((resolve, reject)=>{
368368
installer.installAfterRequirements(fakeProgress, resolve, reject);
369369
}).then(()=>{
370-
expect(child_process.exec).calledWith('chmod +x ' + path.join('ocBinRoot', 'minishift'));
371-
expect(child_process.exec).calledWith('chmod +x ' + path.join(process.cwd(), 'Users', 'dev1', '.minishift', 'cache', 'oc', '1.4.1', 'oc'));
370+
expect(child_process.exec).calledWith('chmod +x \'' + path.join('ocBinRoot', 'minishift') + '\'');
371+
expect(child_process.exec).calledWith('chmod +x \'' + path.join(process.cwd(), 'Users', 'dev1', '.minishift', 'cache', 'oc', '1.4.1', 'oc') + '\'');
372372
});
373373
});
374374

0 commit comments

Comments
 (0)