11import { IOptions } from "../declarations" ;
2- import { IChildProcess , IFileSystem } from "../common/declarations" ;
2+ import { IChildProcess , IFileSystem , IHostInfo } from "../common/declarations" ;
33import { ICommand , ICommandParameter } from "../common/definitions/commands" ;
44import { injector } from "../common/yok" ;
55import { IProjectData } from "../definitions/project" ;
@@ -13,7 +13,8 @@ export class TypingsCommand implements ICommand {
1313 private $fs : IFileSystem ,
1414 private $projectData : IProjectData ,
1515 private $mobileHelper : Mobile . IMobileHelper ,
16- private $childProcess : IChildProcess
16+ private $childProcess : IChildProcess ,
17+ private $hostInfo : IHostInfo ,
1718 ) { }
1819
1920 public async execute ( args : string [ ] ) : Promise < void > {
@@ -74,7 +75,7 @@ ns typings android --jar classes.jar --jar dependency-of-classes-jar.jar
7475 if ( ! this . $fs . exists ( dtsGeneratorPath ) ) {
7576 this . $logger . warn ( "No platforms folder found, preparing project now..." ) ;
7677 await this . $childProcess . spawnFromEvent (
77- "ns" ,
78+ this . $hostInfo . isWindows ? "ns.cmd" : "ns" ,
7879 [ "prepare" , "android" ] ,
7980 "exit" ,
8081 { stdio : "inherit" }
0 commit comments