fastpilot 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/fastpilot.js +3 -1
- package/package.json +1 -1
package/bin/fastpilot.js
CHANGED
|
@@ -6,7 +6,9 @@ const path = require("path");
|
|
|
6
6
|
const { spawnSync } = require("child_process");
|
|
7
7
|
|
|
8
8
|
const bin = path.join(__dirname, "..", "vendor", "fastpilot");
|
|
9
|
-
|
|
9
|
+
// Under `npx`, MCP configs written by `fastpilot demo` / `init` should start `npx -y fastpilot mcp`.
|
|
10
|
+
const env = process.env.npm_command === "exec" ? { ...process.env, FASTPILOT_VIA_NPX: "1" } : process.env;
|
|
11
|
+
const r = spawnSync(bin, process.argv.slice(2), { stdio: "inherit", env });
|
|
10
12
|
if (r.error) {
|
|
11
13
|
console.error(`fastpilot: ${r.error.message} (reinstall the package, or set FASTPILOT_SKIP_DOWNLOAD=1 and put your own build on PATH)`);
|
|
12
14
|
process.exit(1);
|
package/package.json
CHANGED