This commit is contained in:
2025-08-05 16:39:00 +02:00
parent 4cd4e04028
commit 1770ac561e
5 changed files with 14 additions and 13 deletions

View File

@@ -1,7 +1,7 @@
print("Running a basic command using run().do()...");
print("Running a basic command using run().execute()...");
// Execute a simple command
let result = run("echo Hello from run_basic!").do();
let result = run("echo Hello from run_basic!").execute();
// Print the command result
print(`Command: echo Hello from run_basic!`);
@@ -13,6 +13,6 @@ print(`Stderr:\n${result.stderr}`);
// Example of a command that might fail (if 'nonexistent_command' doesn't exist)
// This will halt execution by default because ignore_error() is not used.
// print("Running a command that will fail (and should halt)...");
// let fail_result = run("nonexistent_command").do(); // This line will cause the script to halt if the command doesn't exist
// let fail_result = run("nonexistent_command").execute(); // This line will cause the script to halt if the command doesn't exist
print("Basic run() example finished.");