Skip to content

Commit

Permalink
Swap out child_spawn with cross-spawn to address windows issue nodejs…
Browse files Browse the repository at this point in the history
  • Loading branch information
Leapward-Koex committed Jul 23, 2023
1 parent d4364b6 commit 6a0c136
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@
"watch": "webpack --watch"
},
"devDependencies": {
"@types/cross-spawn": "^6.0.2",
"@types/glob": "^8.1.0",
"@types/listr": "^0.14.4",
"@types/mocha": "^10.0.1",
Expand All @@ -254,6 +255,7 @@
},
"dependencies": {
"apk-mitm": "^1.2.1",
"cross-spawn": "^7.0.3",
"extract-zip": "^2.0.1"
}
}
4 changes: 2 additions & 2 deletions src/utils/executor.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as child_process from "child_process";
import * as fs from "fs";
import * as cross_spawn from "cross-spawn";
import * as vscode from "vscode";
import { outputChannel } from "../data/constants";

Expand Down Expand Up @@ -60,7 +60,7 @@ export function executeProcess(processOptions: ProcessOptions): Thenable<void> {
return new Promise<void>((resolve) => {
progress.report({ message: processOptions.report });

const cp = child_process.spawn(
const cp = cross_spawn.spawn(
processOptions.command,
processOptions.args,
{
Expand Down
9 changes: 9 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,13 @@
resolved "https://registry.yarnpkg.com/@tybys/oid/-/oid-3.0.0.tgz#ee581f2d23d631a049312d1049c54f9b4334983c"
integrity sha512-sRsDzqzxsinQV4Ewl65trK45qjINNRh6/iFn/Wil+cab4l5rFy8sQu7OfRL2LNIuLPvVXG/lsVqKvsuMLo5Ttw==

"@types/cross-spawn@^6.0.2":
version "6.0.2"
resolved "https://registry.yarnpkg.com/@types/cross-spawn/-/cross-spawn-6.0.2.tgz#168309de311cd30a2b8ae720de6475c2fbf33ac7"
integrity sha512-KuwNhp3eza+Rhu8IFI5HUXRP0LIhqH5cAjubUvGXXthh4YYBuP2ntwEX+Cz8GJoZUHlKo247wPWOfA9LYEq4cw==
dependencies:
"@types/node" "*"

"@types/eslint-scope@^3.7.3":
version "3.7.4"
resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.4.tgz#37fc1223f0786c39627068a12e94d6e6fc61de16"
Expand Down Expand Up @@ -3173,6 +3180,7 @@ source-map@^0.6.0:
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==

"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0:
name string-width-cjs
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
Expand Down Expand Up @@ -3698,6 +3706,7 @@ workerpool@6.2.1:
integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==

"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
name wrap-ansi-cjs
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
Expand Down

0 comments on commit 6a0c136

Please sign in to comment.