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

Clarify that ProcessStartInfo.UseShellExecute does not mean bash #436

Merged
merged 2 commits into from
Sep 26, 2018
Merged

Clarify that ProcessStartInfo.UseShellExecute does not mean bash #436

merged 2 commits into from
Sep 26, 2018

Conversation

omajid
Copy link
Member

@omajid omajid commented Aug 15, 2018

The property name is very confusing on unix-like platforms. Anyone familiar with unix-like platforms will probably assume it means /bin/bash or /bin/sh. Clarify that it does not mean that shell and that
it refers to the conecpt of shell on Windows, which is closer in meaning to "desktop".

For an example of this tripping up users, see: dotnet/core#1857. For more on the cross-platform inconsistencies of UseShellExecute, see https://github.com/dotnet/corefx/issues/24704

To be honest, I am not sure this is a good change, but I can't find a good style guide or examples on how to best document the caveats on different platforms. Suggestions on improving this change are more than welcome!

@BillWagner BillWagner requested a review from mairaw August 16, 2018 14:31
mairaw
mairaw previously requested changes Sep 20, 2018
Copy link
Contributor

@mairaw mairaw 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 the PR @omajid and apologize on the delay getting back to you on this. I've left a suggestion on some rewording. Please take a look.

@@ -1466,6 +1466,8 @@ p.WaitForExit();

Setting this property to `false` enables you to redirect input, output, and error streams.

This property has nothing to do with command shells (`bash`, `sh`) on Unix-like platforms. The term shell in the name here is a reference to the graphical shell on Windows. The word "shell" in this context means the same as "desktop", and lets users launch graphical applications or open documents.
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd probably rewrite the first two sentences a bit:

This property isn't related to command shells (bash, sh) on Unix-like platforms. The term shell in the API name is a reference to the graphical shell 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.

I'd just shorten it to something like "The word "shell" in this context [UseShellExecute] refers to a graphical shell (similarly as on Windows) rather than command shells (i.e. bash or sh), and lets users launch graphical applications or open documents.". It can still use sh/bash in certain scenarios so "nothing to do" is IMO too strong.

@mairaw
Copy link
Contributor

mairaw commented Sep 20, 2018

@wtgodbe, @krwq can you take a look at this PR as well?

@wtgodbe
Copy link
Member

wtgodbe commented Sep 20, 2018

@TSlivede Is this still a change we want, given the discussions in https://github.com/dotnet/corefx/issues/24704?

@TSlivede
Copy link

TSlivede commented Sep 20, 2018

Is this still a change we want, given the discussions in dotnet/corefx#24704?

If you ask me: Yes, something like this is a change, that we absolutely want. Although the future of UseShellExecute is not yet clear, in my opinion there is one thing, that it can absolutely not be about - UseShellExecute is not about sh or bash. So in my opinion this addition to the documentation is long overdue.

To clear things up one could possibly add a link to the shellExecute documentation.

The property name is very confusing on unix-like platforms. Anyone
familiar with unix-like platforms will probably assume it means
/bin/bash or /bin/sh. Clarify that it does not mean that shell and that
it refers to the conecpt of shell on Windows, which is closer in meaning
to "desktop".

For an example of this tripping up users, see:
dotnet/core#1857. For more on the
cross-platform inconsistencies of UseShellExecute, see
https://github.com/dotnet/corefx/issues/24704
Copy link
Member

@krwq krwq left a comment

Choose a reason for hiding this comment

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

LGTM content-wise, @mairaw, @rpetrusha please check for wording and style

Copy link

@rpetrusha rpetrusha 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 submitting this PR, @omajid. I've made some minor changes, and I'll merge it when our internal build completes.

@rpetrusha rpetrusha assigned rpetrusha and omajid and unassigned rpetrusha Sep 25, 2018
@rpetrusha rpetrusha dismissed mairaw’s stale review September 26, 2018 00:17

Requested changes were addressed.

@rpetrusha rpetrusha merged commit 1df1371 into dotnet:master Sep 26, 2018
@omajid
Copy link
Member Author

omajid commented Sep 26, 2018

Thanks for merging the fix!

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.

6 participants