Merge pull request #41 from NativeScript/lini/fix-platform-detection

fix check for win32 platform
This commit is contained in:
Stoyan Stratev 2017-10-31 10:33:36 +02:00 коммит произвёл GitHub
Родитель 8d15d575d2 8f0e89c6a5
Коммит ec89ac4425
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -7,7 +7,7 @@ const defaultHeaders = {
export class NsStarterKitsNpmService implements INsStarterKitsNpmService {
installPageTemplate(pageName: string, flavor: string, templatesDirectory: string): Promise<any> {
return new Promise((resolve, reject) => {
const command: string = (process.platform.indexOf("win") > -1) ? "npm.cmd" : "npm";
const command: string = (process.platform === "win32") ? "npm.cmd" : "npm";
const commandArguments: Array<any> = ["install"];
const options = { cwd: templatesDirectory };
let packageName: string;