1
1
import { IOptions } from "../declarations" ;
2
- import { IChildProcess , IFileSystem } from "../common/declarations" ;
2
+ import { IChildProcess , IFileSystem , IHostInfo } from "../common/declarations" ;
3
3
import { ICommand , ICommandParameter } from "../common/definitions/commands" ;
4
4
import { injector } from "../common/yok" ;
5
5
import { IProjectData } from "../definitions/project" ;
@@ -13,7 +13,8 @@ export class TypingsCommand implements ICommand {
13
13
private $fs : IFileSystem ,
14
14
private $projectData : IProjectData ,
15
15
private $mobileHelper : Mobile . IMobileHelper ,
16
- private $childProcess : IChildProcess
16
+ private $childProcess : IChildProcess ,
17
+ private $hostInfo : IHostInfo ,
17
18
) { }
18
19
19
20
public async execute ( args : string [ ] ) : Promise < void > {
@@ -74,7 +75,7 @@ ns typings android --jar classes.jar --jar dependency-of-classes-jar.jar
74
75
if ( ! this . $fs . exists ( dtsGeneratorPath ) ) {
75
76
this . $logger . warn ( "No platforms folder found, preparing project now..." ) ;
76
77
await this . $childProcess . spawnFromEvent (
77
- "ns" ,
78
+ this . $hostInfo . isWindows ? "ns.cmd" : "ns" ,
78
79
[ "prepare" , "android" ] ,
79
80
"exit" ,
80
81
{ stdio : "inherit" }
0 commit comments