diff --git a/garden-service/package-lock.json b/garden-service/package-lock.json index 580afb3c8f..2cf8aa6848 100644 --- a/garden-service/package-lock.json +++ b/garden-service/package-lock.json @@ -435,6 +435,15 @@ "commander": "*" } }, + "@types/cross-spawn": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@types/cross-spawn/-/cross-spawn-6.0.0.tgz", + "integrity": "sha512-evp2ZGsFw9YKprDbg8ySgC9NA15g3YgiI8ANkGmKKvvi0P2aDGYLPxQIC5qfeKNUOe3TjABVGuah6omPRpIYhg==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, "@types/dedent": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/@types/dedent/-/dedent-0.7.0.tgz", @@ -1764,6 +1773,17 @@ "cross-spawn": "^4.0.2", "node-version": "^1.0.0", "promise-polyfill": "^6.0.1" + }, + "dependencies": { + "cross-spawn": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz", + "integrity": "sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE=", + "requires": { + "lru-cache": "^4.0.1", + "which": "^1.2.9" + } + } } }, "chokidar": { @@ -2245,11 +2265,14 @@ } }, "cross-spawn": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz", - "integrity": "sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE=", + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", "requires": { - "lru-cache": "^4.0.1", + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", "which": "^1.2.9" } }, diff --git a/garden-service/package.json b/garden-service/package.json index 9410291736..f045bd1739 100644 --- a/garden-service/package.json +++ b/garden-service/package.json @@ -36,6 +36,7 @@ "cli-cursor": "^2.1.0", "cli-highlight": "^2.0.0", "cli-truncate": "^1.1.0", + "cross-spawn": "^6.0.5", "cryo": "0.0.6", "dedent": "^0.7.0", "deep-diff": "^1.0.1", @@ -82,6 +83,7 @@ "@types/async-lock": "^1.1.0", "@types/bluebird": "^3.5.23", "@types/chai": "^4.1.4", + "@types/cross-spawn": "^6.0.0", "@types/dedent": "^0.7.0", "@types/deep-diff": "0.0.31", "@types/dockerode": "^2.5.5", diff --git a/garden-service/src/plugins/google/gcloud.ts b/garden-service/src/plugins/google/gcloud.ts index eb34d234d0..4aac80133c 100644 --- a/garden-service/src/plugins/google/gcloud.ts +++ b/garden-service/src/plugins/google/gcloud.ts @@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -import { spawn } from "child_process" +import * as spawn from "cross-spawn" import { extend } from "lodash" import { spawnPty } from "../../util/util" diff --git a/garden-service/src/plugins/kubernetes/kubectl.ts b/garden-service/src/plugins/kubernetes/kubectl.ts index 58f9e12777..ae322055be 100644 --- a/garden-service/src/plugins/kubernetes/kubectl.ts +++ b/garden-service/src/plugins/kubernetes/kubectl.ts @@ -7,7 +7,8 @@ */ import chalk from "chalk" -import { ChildProcess, spawn } from "child_process" +import { ChildProcess } from "child_process" +import * as spawn from "cross-spawn" import { extend } from "lodash" import { encodeYamlMulti, spawnPty } from "../../util/util" import { RuntimeError } from "../../exceptions" diff --git a/garden-service/src/util/util.ts b/garden-service/src/util/util.ts index 9bbb1345d2..f098152e82 100644 --- a/garden-service/src/util/util.ts +++ b/garden-service/src/util/util.ts @@ -13,7 +13,7 @@ import * as exitHook from "async-exit-hook" import * as klaw from "klaw" import * as yaml from "js-yaml" import * as Cryo from "cryo" -import { spawn as _spawn } from "child_process" +import * as _spawn from "cross-spawn" import { pathExists, readFile, writeFile } from "fs-extra" import { join, basename, win32, posix } from "path" import { find, pick, difference, fromPairs } from "lodash"