mslxdff 0.1.6 → 0.1.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/bin/mslxdff.js +3 -2
- package/package.json +1 -1
package/bin/mslxdff.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { execFile } from "node:child_process";
|
|
3
|
-
import { readFileSync, existsSync, statSync, watch, openSync } from "node:fs";
|
|
3
|
+
import { readFileSync, existsSync, statSync, watch, openSync, closeSync, mkdirSync } from "node:fs";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
5
|
import { dirname, join } from "node:path";
|
|
6
6
|
import { startServer, resolvePort } from "../src/server.js";
|
|
@@ -685,7 +685,8 @@ async function liveDebug() {
|
|
|
685
685
|
// ensure the event file exists so watch() doesn't fail on a fresh daemon dir
|
|
686
686
|
if (!existsSync(file)) {
|
|
687
687
|
try {
|
|
688
|
-
|
|
688
|
+
mkdirSync(dirname(file), { recursive: true });
|
|
689
|
+
closeSync(openSync(file, "a"));
|
|
689
690
|
} catch {
|
|
690
691
|
console.error(`cannot create event file: ${file}`);
|
|
691
692
|
process.exit(1);
|