Skip to content

Commit

Permalink
feat: use watchfile on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
jkoenig134 committed Feb 13, 2025
1 parent 8245909 commit 9b0a8d2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/commands/LogsCommand.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import chalk from "chalk"
import fs from "fs/promises"
import os from "os"
import { Tail } from "tail"
import * as yargs from "yargs"
import { BaseCommand } from "./BaseCommand.js"
Expand Down Expand Up @@ -41,7 +42,7 @@ export class LogsCommand extends BaseCommand<never> {
}

private tailLogs(logFilePath: string): void {
const tail = new Tail(logFilePath, { fromBeginning: false, fsWatchOptions: {}, follow: true })
const tail = new Tail(logFilePath, { fromBeginning: false, fsWatchOptions: {}, follow: true, useWatchFile: os.platform() === "win32" })

tail.on("line", (data) => {
console.log(data)
Expand Down

0 comments on commit 9b0a8d2

Please sign in to comment.