diff options
Diffstat (limited to 'examples/cat.ts')
-rw-r--r-- | examples/cat.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/cat.ts b/examples/cat.ts index 1bb1c809a..a7d60b347 100644 --- a/examples/cat.ts +++ b/examples/cat.ts @@ -1,5 +1,6 @@ import { resolve } from "path"; const { write, stdout, file } = Bun; -const input = resolve(process.argv[process.argv.length - 1]); +const { argv } = process; -await write(stdout, file(input)); +const path = resolve(argv.at(-1)); +await write(stdout, file(path)); |