diff --git a/src/tts.ts b/src/tts.ts index 5fcf80c..b7b976a 100644 --- a/src/tts.ts +++ b/src/tts.ts @@ -62,6 +62,14 @@ async function main() { const home = os.homedir(); const cwd = path.join(home, ".ttsc"); + const firstRun = await (async () => { + try { + await fs.access(cwd, fs.constants.F_OK); + return false; + } catch { + return true; + } + })(); if (editContent) { const file = path.join(cwd, "input.txt"); @@ -90,7 +98,7 @@ async function main() { cwd, input, stdout: "pipe", - stderr: "inherit", + stderr: firstRun ? "inherit" : "ignore", })`uv run -- python -u main.py`; if (!waitAndCombine) {