We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0d3ecb0 commit 6c57bcaCopy full SHA for 6c57bca
1 file changed
packages/create-puzzmo/src/index.js
@@ -2,8 +2,11 @@
2
3
import { spawnSync } from "node:child_process"
4
import { get } from "node:https"
5
-// Forward all args to `puzzmo game create`
6
-const args = process.argv.slice(2)
+// Forward all args to `puzzmo game create`. Users naturally type `npm create puzzmo game`,
+// 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
10
11
// Detect the package manager that invoked this script
12
const pm = detectPackageManager()
0 commit comments