@hienlh/ppm 0.5.6 → 0.5.7
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/CHANGELOG.md +5 -0
- package/package.json +1 -1
- package/src/server/index.ts +4 -2
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
package/src/server/index.ts
CHANGED
|
@@ -310,13 +310,15 @@ export async function startServer(options: {
|
|
|
310
310
|
// Windows: Bun.spawn child may die when parent exits (same job object).
|
|
311
311
|
// Use PowerShell Start-Process to create a truly detached process.
|
|
312
312
|
const bunExe = process.execPath.replace(/\\/g, "\\\\");
|
|
313
|
+
const logEscaped = logFile.replace(/\\/g, "\\\\");
|
|
314
|
+
const errLog = logFile.replace(/\.log$/, ".err.log").replace(/\\/g, "\\\\");
|
|
313
315
|
const argStr = ["run", script, ...args].map((a) => `'${a}'`).join(",");
|
|
314
316
|
const psCmd = [
|
|
315
317
|
`$p = Start-Process -PassThru -WindowStyle Hidden`,
|
|
316
318
|
`-FilePath '${bunExe}'`,
|
|
317
319
|
`-ArgumentList ${argStr}`,
|
|
318
|
-
`-RedirectStandardOutput '${
|
|
319
|
-
`-RedirectStandardError '${
|
|
320
|
+
`-RedirectStandardOutput '${logEscaped}'`,
|
|
321
|
+
`-RedirectStandardError '${errLog}'`,
|
|
320
322
|
`; Write-Output $p.Id`,
|
|
321
323
|
].join(" ");
|
|
322
324
|
const result = Bun.spawnSync({
|