Skip to content

Commit

Permalink
fix(windows): make sure dir is there first (might fix error with wind…
Browse files Browse the repository at this point in the history
…ows)
  • Loading branch information
Rinse12 committed Dec 2, 2024
1 parent c8e1bb8 commit 04df721
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/cli/commands/daemon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ export default class Daemon extends Command {
private async _pipeDebugLogsToLogFile(logPath: string) {
const logFilePath = await this._getNewLogfileByEvacuatingOldLogsIfNeeded(logPath);

await fsPromise.mkdir(path.dirname(logFilePath), { recursive: true });
await fsPromise.writeFile(logFilePath, ""); // make sure it exists first
const logFile = fs.createWriteStream(logFilePath, { flags: "a" });
const stdoutWrite = process.stdout.write.bind(process.stdout);
Expand Down

0 comments on commit 04df721

Please sign in to comment.