From 93133b88ff84644fde0760da4ade90e9183f1e69 Mon Sep 17 00:00:00 2001 From: Brandon High Date: Fri, 10 Jan 2025 12:15:58 -0800 Subject: [PATCH] Fix "Example of a NodeJS file task with arguments" The variables didn't quite match up with the usage. --- docs/tasks/file-tasks.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/tasks/file-tasks.md b/docs/tasks/file-tasks.md index 26ce0597e6..7618e876dc 100644 --- a/docs/tasks/file-tasks.md +++ b/docs/tasks/file-tasks.md @@ -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: