Skip to content

Commit

Permalink
docs: Fix "Example of a NodeJS file task with arguments" (#4046)
Browse files Browse the repository at this point in the history
The variables didn't quite match up with the usage.
  • Loading branch information
highb authored Jan 10, 2025
1 parent 432e0c3 commit 41932e9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/tasks/file-tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,12 @@ const fs = require("fs");
const { usage_user, usage_force, usage_output_file } = process.env;

if (usage_force === "true") {
fs.rmSync(usage_file, { force: true });
fs.rmSync(usage_output_file, { force: true });
}

const user = usage_user ?? "world";
fs.appendFileSync(usage_file, `Hello, ${user}\n`);
console.log(`Greeting written to ${usage_file}`);
fs.appendFileSync(usage_output_file, `Hello, ${user}\n`);
console.log(`Greeting written to ${usage_output_file}`);
```
Run it with:
Expand Down

0 comments on commit 41932e9

Please sign in to comment.