From 50ac141a258778038a7dd16efaf33761db6c08d0 Mon Sep 17 00:00:00 2001 From: develar Date: Fri, 8 Apr 2016 13:24:59 +0200 Subject: [PATCH] fix: vendor/osx/7za seems to be broken Closes #296 --- .travis.yml | 2 +- package.json | 6 +++--- src/util.ts | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0e0d6686d95..6d7be5f7e10 100755 --- a/.travis.yml +++ b/.travis.yml @@ -26,7 +26,7 @@ addons: before_install: - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install gnu-tar dpkg libicns graphicsmagick git-lfs; fi - - git lfs pull + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then git lfs pull; fi - gem install --no-rdoc --no-ri fpm - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then curl -L https://github.com/github/git-lfs/releases/download/v1.1.2/git-lfs-linux-amd64-1.1.2.tar.gz | tar -xz; fi - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then git-lfs-1.1.2/git-lfs pull; fi diff --git a/package.json b/package.json index 4f37092b9fa..7479e7eedff 100644 --- a/package.json +++ b/package.json @@ -67,11 +67,11 @@ "progress-stream": "^1.2.0", "read-package-json": "^2.0.3", "source-map-support": "^0.4.0", - "tmp": "0.0.28" + "tmp": "0.0.28", + "7zip-bin": "0.0.2" }, "optionalDependencies": { - "appdmg": "^0.3.6", - "7zip-bin": "0.0.2" + "appdmg": "^0.3.6" }, "devDependencies": { "ava-tf": "^0.12.4-beta.6", diff --git a/src/util.ts b/src/util.ts index 86bec49a3a9..d8146143a21 100644 --- a/src/util.ts +++ b/src/util.ts @@ -4,6 +4,7 @@ import readPackageJsonAsync = require("read-package-json") import * as os from "os" import * as path from "path" import { readJson } from "fs-extra-p" +import { platform } from "os"; //noinspection JSUnusedLocalSymbols const __awaiter = require("./awaiter") @@ -35,7 +36,7 @@ export function installDependencies(appDir: string, electronVersion: string, arc let npmExecPath = process.env.npm_execpath || process.env.NPM_CLI_JS const npmExecArgs = [command, "--production"] if (npmExecPath == null) { - npmExecPath = "npm" + npmExecPath = process.platform === "win32" ? "npm.cmd" : "npm" } else { npmExecArgs.unshift(npmExecPath)