diff options
author | 2021-12-24 06:14:17 +0000 | |
---|---|---|
committer | 2021-12-24 06:15:44 +0000 | |
commit | a94bbd8f3cf823e70601999b7126f65a7d94024a (patch) | |
tree | b8bab83f11d57a7584932ccd39c944b0a265913d | |
parent | 46354da72847acffc63b9801e6a952124e484732 (diff) | |
download | bun-a94bbd8f3cf823e70601999b7126f65a7d94024a.tar.gz bun-a94bbd8f3cf823e70601999b7126f65a7d94024a.tar.zst bun-a94bbd8f3cf823e70601999b7126f65a7d94024a.zip |
[bun create] Run with bun run
-rw-r--r-- | integration/apps/bun-create-next.sh | 8 | ||||
-rw-r--r-- | integration/apps/bun-create-react.sh | 7 | ||||
-rw-r--r-- | src/cli/create_command.zig | 4 |
3 files changed, 15 insertions, 4 deletions
diff --git a/integration/apps/bun-create-next.sh b/integration/apps/bun-create-next.sh index 7f909d79f..832931a04 100644 --- a/integration/apps/bun-create-next.sh +++ b/integration/apps/bun-create-next.sh @@ -7,7 +7,13 @@ killall -9 $(basename $BUN_BIN) || echo "" rm -rf /tmp/next-app mkdir -p /tmp/next-app $BUN_BIN create next /tmp/next-app + +if (($?)); then + echo "bun create failed" + exit 1 +fi + cd /tmp/next-app BUN_CRASH_WITHOUT_JIT=1 $BUN_BIN --port 8087 & - +sleep 0.1 curl --fail http://localhost:8087/ && killall -9 $(basename $BUN_BIN) && echo "✅ bun create next passed." diff --git a/integration/apps/bun-create-react.sh b/integration/apps/bun-create-react.sh index 7d47de2c4..2b986134c 100644 --- a/integration/apps/bun-create-react.sh +++ b/integration/apps/bun-create-react.sh @@ -5,6 +5,13 @@ killall -9 $(basename $BUN_BIN) || echo "" rm -rf /tmp/react-app mkdir -p /tmp/react-app $BUN_BIN create react /tmp/react-app + + +if (($?)); then + echo "bun create failed" + exit 1 +fi + cd /tmp/react-app BUN_CRASH_WITHOUT_JIT=1 $BUN_BIN --port 8087 & sleep 0.005 diff --git a/src/cli/create_command.zig b/src/cli/create_command.zig index 096fe5ab7..0a9cc2c5e 100644 --- a/src/cli/create_command.zig +++ b/src/cli/create_command.zig @@ -60,9 +60,7 @@ const never_conflict = &[_]string{ ".git/", }; -const npm_task_args = &[_]string{ - "exec", -}; +const npm_task_args = &[_]string{"run"}; const UnsupportedPackages = struct { @"styled-jsx": bool = false, |