From 4674cca337bd645a2e8d45987c055d2f077489f8 Mon Sep 17 00:00:00 2001 From: mitchell Date: Tue, 9 Jun 2026 21:27:08 -0400 Subject: [PATCH] refactor(tts): replace execa shell command with native fs.rm iteration --- tts.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tts.ts b/tts.ts index 907a05c..844166b 100644 --- a/tts.ts +++ b/tts.ts @@ -1,3 +1,4 @@ +#!/usr/bin/env node import fs from "node:fs/promises"; import os from "node:os"; import path from "node:path"; @@ -63,8 +64,8 @@ async function main() { const home = os.homedir(); const cwd = path.join(home, ".ttsc"); - const wavs = await Array.fromAsync(fs.glob(path.join(cwd, "*.wav"))); - await execa({ cwd, shell: true, reject: false })`rm ${wavs}`; + const wavs = fs.glob(path.join(cwd, "*.wav")); + for await (const wav of wavs) await fs.rm(wav); if (edit) { const file = path.join(cwd, "input.txt");