@sparkelf/dsh-plus 0.1.0-rc.37 → 0.1.0-rc.38
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/lib/bin.js +14 -3
- package/lib/types/standalone-profile.js +16 -3
- package/package.json +1 -1
package/lib/bin.js
CHANGED
|
@@ -401,11 +401,22 @@ function alignReplacedPackageNames(profileModules) {
|
|
|
401
401
|
renameSync(temporary, manifestPath);
|
|
402
402
|
}
|
|
403
403
|
}
|
|
404
|
-
/**
|
|
404
|
+
/**
|
|
405
|
+
* Run pnpm in one directory, inheriting its output.
|
|
406
|
+
*
|
|
407
|
+
* Windows resolves a command through its shell: \`spawnSync\` on a \`.cmd\` shim fails
|
|
408
|
+
* with EINVAL, so the call goes through \`cmd.exe\` there. This matches the runner in
|
|
409
|
+
* \`apply.ts\`, which the apply path has used on Windows since it shipped.
|
|
410
|
+
*
|
|
411
|
+
* @param cwd - the directory pnpm runs in.
|
|
412
|
+
* @param args - pnpm arguments, without the executable.
|
|
413
|
+
* @param label - the failing step's name, for the error.
|
|
414
|
+
*/
|
|
405
415
|
function runPnpm(cwd, args, label) {
|
|
406
|
-
const result = spawnSync(
|
|
416
|
+
const result = spawnSync("pnpm", [...args], {
|
|
407
417
|
cwd,
|
|
408
|
-
stdio: "inherit"
|
|
418
|
+
stdio: "inherit",
|
|
419
|
+
shell: process.platform === "win32"
|
|
409
420
|
});
|
|
410
421
|
if (result.error !== void 0) throw result.error;
|
|
411
422
|
if (result.status !== 0) throw new Error(label + " failed with exit code " + String(result.status));
|
|
@@ -197,10 +197,23 @@ export function alignReplacedPackageNames(profileModules) {
|
|
|
197
197
|
renameSync(temporary, manifestPath);
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
|
-
/**
|
|
200
|
+
/**
|
|
201
|
+
* Run pnpm in one directory, inheriting its output.
|
|
202
|
+
*
|
|
203
|
+
* Windows resolves a command through its shell: \`spawnSync\` on a \`.cmd\` shim fails
|
|
204
|
+
* with EINVAL, so the call goes through \`cmd.exe\` there. This matches the runner in
|
|
205
|
+
* \`apply.ts\`, which the apply path has used on Windows since it shipped.
|
|
206
|
+
*
|
|
207
|
+
* @param cwd - the directory pnpm runs in.
|
|
208
|
+
* @param args - pnpm arguments, without the executable.
|
|
209
|
+
* @param label - the failing step's name, for the error.
|
|
210
|
+
*/
|
|
201
211
|
function runPnpm(cwd, args, label) {
|
|
202
|
-
const
|
|
203
|
-
|
|
212
|
+
const result = spawnSync('pnpm', [...args], {
|
|
213
|
+
cwd,
|
|
214
|
+
stdio: 'inherit',
|
|
215
|
+
shell: process.platform === 'win32',
|
|
216
|
+
});
|
|
204
217
|
if (result.error !== undefined)
|
|
205
218
|
throw result.error;
|
|
206
219
|
if (result.status !== 0)
|
package/package.json
CHANGED