@@ -138,7 +138,7 @@ export class IosProject extends NSProject {
138
138
139
139
let rebuild = ( args . request == "launch" ) ? ( args as ILaunchRequestArgs ) . rebuild : true ;
140
140
// build command to execute
141
- let command = new CommandBuilder ( )
141
+ let command = new CommandBuilder ( args . nativescriptCliPath )
142
142
. appendParam ( "debug" )
143
143
. appendParam ( this . platform ( ) )
144
144
. appendParamIf ( "--emulator" , args . emulator )
@@ -232,7 +232,7 @@ export class AndroidProject extends NSProject {
232
232
let launched = false ;
233
233
234
234
return new Promise < void > ( ( resolve , reject ) => {
235
- let command = new CommandBuilder ( )
235
+ let command = new CommandBuilder ( args . nativescriptCliPath )
236
236
. appendParam ( "debug" )
237
237
. appendParam ( this . platform ( ) )
238
238
. appendParamIf ( "--emulator" , args . emulator )
@@ -286,7 +286,7 @@ export class AndroidProject extends NSProject {
286
286
287
287
//return Promise.resolve(40001);
288
288
289
- let command = new CommandBuilder ( )
289
+ let command = new CommandBuilder ( args . nativescriptCliPath )
290
290
. appendParam ( "debug" )
291
291
. appendParam ( this . platform ( ) )
292
292
. appendParam ( "--get-port" )
@@ -337,10 +337,14 @@ export class AndroidProject extends NSProject {
337
337
}
338
338
339
339
class CommandBuilder {
340
- public static tnsPath : string = 'tns' ;
341
340
341
+ private _tnsPath : string ;
342
342
private _command : string [ ] = [ ] ;
343
343
344
+ constructor ( tnsPath ?: string ) {
345
+ this . _tnsPath = tnsPath || "tns" ;
346
+ }
347
+
344
348
public appendParam ( parameter : string ) : CommandBuilder {
345
349
this . _command . push ( parameter ) ;
346
350
return this ;
@@ -359,7 +363,7 @@ class CommandBuilder {
359
363
}
360
364
361
365
public build ( ) : { path : string , args : string [ ] } {
362
- return { path : CommandBuilder . tnsPath , args : this . _command } ;
366
+ return { path : this . _tnsPath , args : this . _command } ;
363
367
}
364
368
365
369
public buildAsString ( ) : string {
0 commit comments