Skip to content

Commit

Permalink
setup default value for askToggle
Browse files Browse the repository at this point in the history
  • Loading branch information
tahsinature committed Nov 19, 2024
1 parent e184705 commit e9d43f1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ const hardbrake = async () => {
}

const preset = await askPreset();
const keepAudio = await askToggle("Do you want to keep the audio?");
const keepAudio = await askToggle("Do you want to keep the audio?", { initial: true });

await main(files, preset, { keepAudio });

const happyWithResults = await askToggle("Are you happy with the results?");
const happyWithResults = await askToggle("Are you happy with the results?", { initial: true });
if (!happyWithResults) {
for (const file of files) await file.deleteOutput();
console.log("Deleted all the output files.");
process.exit(0);
}

const deleteOriginalFiles = await askToggle("Do you want to delete the original files?");
const deleteOriginalFiles = await askToggle("Do you want to delete the original files?", { initial: false });
if (deleteOriginalFiles) {
for (const file of files) await file.deleteOriginal();
console.log("Deleted all the original files.");
Expand Down

0 comments on commit e9d43f1

Please sign in to comment.