@mintlify/cli 4.0.916 → 4.0.918
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/index.js +4 -2
- package/bin/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +8 -8
- package/src/index.ts +14 -15
package/bin/index.js
CHANGED
|
@@ -66,11 +66,13 @@ process.on('unhandledRejection', () => __awaiter(void 0, void 0, void 0, functio
|
|
|
66
66
|
yield cleanup();
|
|
67
67
|
exitProcess(1);
|
|
68
68
|
}));
|
|
69
|
+
// Arguments are passed as array elements to spawn() without shell: true,
|
|
70
|
+
// so shell metacharacters are not interpreted and command injection is prevented.
|
|
71
|
+
const userArgs = process.argv.slice(2);
|
|
69
72
|
try {
|
|
70
|
-
cli = spawn('node', ['--no-deprecation', path.join(__dirname, '../bin/start.js'), ...
|
|
73
|
+
cli = spawn('node', ['--no-deprecation', path.join(__dirname, '../bin/start.js'), ...userArgs], {
|
|
71
74
|
stdio: 'inherit',
|
|
72
75
|
env: Object.assign(Object.assign({}, process.env), { MINTLIFY_PACKAGE_NAME: packageName, CLI_TEST_MODE: (_c = process.env.CLI_TEST_MODE) !== null && _c !== void 0 ? _c : 'false' }),
|
|
73
|
-
shell: process.platform === 'win32',
|
|
74
76
|
windowsHide: process.platform === 'win32',
|
|
75
77
|
detached: false,
|
|
76
78
|
});
|