Skip to content
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

Merged
merged 3 commits into from
May 30, 2022
Merged

chore(docs): use cross-platform example in deno.run jsdoc #14754

merged 3 commits into from
May 30, 2022

Conversation

GJZwiers
Copy link
Contributor

@GJZwiers GJZwiers commented May 29, 2022

This PR changes the Deno.run JSDoc to use a curl example that works the same on all the major platforms. Also adds await p.status so the program doesn't exit before the output is shown on the terminal.

@GJZwiers GJZwiers requested a review from kitsonk as a code owner May 29, 2022 11:35
* 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.
Copy link
Member

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.

Copy link
Member

@dsherret dsherret left a 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.

@GJZwiers
Copy link
Contributor Author

Sure thing, I will rewrite it.

@GJZwiers GJZwiers changed the title chore(docs): add pwsh equivalent to deno.run jsdoc chore(docs): use cross-platform example in deno.run jsdoc May 30, 2022
Indentation is two spaces + 1 from jsdoc... really need jsdoc code formatting.
Copy link
Member

@dsherret dsherret left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @GJZwiers!

@dsherret dsherret merged commit d9ed5e9 into denoland:main May 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants