Skip to content

Commit a8b01a8

Browse files
authored
Merge pull request masahirompp#8 from micro-jumbo/master
Use `cross-spawn` to support Windows
2 parents 9457230 + de7e31a commit a8b01a8

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

lib/builder.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { spawnSync } from "child_process";
1+
const spawn = require("cross-spawn");
22
import { resolve, basename, dirname } from "path";
33

44
/**
@@ -58,7 +58,9 @@ export class Builder {
5858
basename(this.options.output),
5959
].filter(Boolean) as string[];
6060

61-
const results = spawnSync(this.webpackBinPath, args, { encoding: "utf-8" });
61+
const results = spawn.sync(this.webpackBinPath, args, {
62+
encoding: "utf-8",
63+
});
6264

6365
if (results.error) {
6466
throw results.error;

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,10 @@
3535
"@aws-cdk/assert": "^1.80.0",
3636
"@aws-cdk/aws-lambda": "^1.80.0",
3737
"@aws-cdk/core": "^1.80.0",
38+
"@types/cross-spawn": "^6.0.2",
3839
"@types/jest": "^26.0.19",
3940
"@types/node": "^14.14.16",
41+
"cross-spawn": "^7.0.3",
4042
"jest": "^26.6.3",
4143
"ts-jest": "^26.4.4",
4244
"ts-loader": "^8.0.12",

0 commit comments

Comments
 (0)