Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit 388e1be

Browse files
authored
from-hardhat: Enable shell option for spawn (#5968)
This is needed for windows to spawn npx correctly
1 parent 613081e commit 388e1be

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/from-hardhat/src/ask-hardhat.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ export const askHardhatVersion = async (
3535

3636
const hardhat = spawn(`npx`, ["hardhat", "--version"], {
3737
stdio: ["pipe", "pipe", "inherit"],
38-
cwd: workingDirectory
38+
cwd: workingDirectory,
39+
shell: true
3940
});
4041

4142
let output = "";
@@ -76,7 +77,8 @@ export const askHardhatConsole = async (
7677
// note the hardhat console instance is spawned with --no-compile which causes it to skip the initial (default) compilation step
7778
const hardhat = spawn(`npx`, ["hardhat", "console", "--no-compile"], {
7879
stdio: ["pipe", "pipe", "inherit"],
79-
cwd: workingDirectory
80+
cwd: workingDirectory,
81+
shell: true
8082
});
8183

8284
// we'll capture the stdout

0 commit comments

Comments
 (0)