Skip to content

Commit 6c57bca

Browse files
Sync packages from monorepo (aa5f955)
1 parent 0d3ecb0 commit 6c57bca

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

packages/create-puzzmo/src/index.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22

33
import { spawnSync } from "node:child_process"
44
import { get } from "node:https"
5-
// Forward all args to `puzzmo game create`
6-
const args = process.argv.slice(2)
5+
// Forward all args to `puzzmo game create`. Users naturally type `npm create puzzmo game`,
6+
// which would forward as `puzzmo game create game ...` — drop a leading "game" so we don't
7+
// pass it through redundantly.
8+
const rawArgs = process.argv.slice(2)
9+
const args = rawArgs[0] === "game" ? rawArgs.slice(1) : rawArgs
710

811
// Detect the package manager that invoked this script
912
const pm = detectPackageManager()

0 commit comments

Comments
 (0)