Skip to content

Commit 6ef2996

Browse files
jrichter1dgolovin
authored andcommitted
Open devstudio on mac even with spaces
1 parent 69d2859 commit 6ef2996

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

browser/pages/start/controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class StartController {
4040
env : Object.assign({}, Platform.ENV)
4141
};
4242
options.env['rhel.subscription.password'] = this.installerDataSvc.password;
43-
return Util.executeCommand(`open ${devStudioAppPath}`, 1, options).then(()=>{
43+
return Util.executeCommand(`open '${devStudioAppPath}'`, 1, options).then(()=>{
4444
Logger.info('devstudio started sucessfully');
4545
this.exit();
4646
}).catch((error)=>{

test/unit/pages/start/controller-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ describe('StartController', function() {
129129
let ctrl = createController(false);
130130
sandbox.stub(ctrl, 'exit').returns();
131131
return ctrl.launchDevstudio().then(()=>{
132-
expect(Util.executeCommand).calledWith(`open ${path.join('developer-studio', 'Devstudio.app')}`);
132+
expect(Util.executeCommand).calledWith(`open '${path.join('developer-studio', 'Devstudio.app')}'`);
133133
expect(Util.executeCommand.args[0][2]['env']['rhel.subscription.password']).to.be.equal('12345678');
134134
expect(ctrl.exit).calledOnce;
135135
});
@@ -141,7 +141,7 @@ describe('StartController', function() {
141141
return ctrl.launchDevstudio().then(()=>{
142142
expect.fail();
143143
}).catch(()=> {
144-
expect(Util.executeCommand).calledWith(`open ${path.join('developer-studio', 'Devstudio.app')}`);
144+
expect(Util.executeCommand).calledWith(`open '${path.join('developer-studio', 'Devstudio.app')}'`);
145145
expect(ctrl.exit).calledOnce;
146146
expect(Logger.error).calledWithMatch('reason');
147147
});

0 commit comments

Comments
 (0)