-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(docs): use cross-platform example in deno.run jsdoc #14754
Conversation
cli/dts/lib.deno.ns.d.ts
Outdated
* an array of program arguments, the first of which is the binary. | ||
* | ||
* ```ts | ||
* const p = Deno.run({ | ||
* cmd: ["echo", "hello"], | ||
* cmd: ["echo", "hello"], // Use ["pwsh", "-c", "echo", "hello"] on Windows. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to suggest that people should use Deno.run
with pwsh
on Windows. To reduce confusion, it would be good to use a command that works on all three operating systems such as curl
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this, but it would be good to instead use a single command that works on all three operating systems.
Sure thing, I will rewrite it. |
Indentation is two spaces + 1 from jsdoc... really need jsdoc code formatting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks @GJZwiers!
This PR changes the
Deno.run
JSDoc to use acurl
example that works the same on all the major platforms. Also addsawait p.status
so the program doesn't exit before the output is shown on the terminal.