Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix error when testing for admin on PSCore Linux. #312

Merged
merged 1 commit into from
Dec 6, 2016
Merged

Fix error when testing for admin on PSCore Linux. #312

merged 1 commit into from
Dec 6, 2016

Conversation

rkeithhill
Copy link
Collaborator

This is somewhat experimental but the short-circuiting if statement should cause all existing users of Windows PowerShell (not core) to go through the old code path. Only PS Core users on LInux/OSX will go through the "id -u" path. I have tested this on Ubuntu but I don't have a Mac so can't test there.

Sorry about the whitespace changes. I have VSCode configured to trim trailing whitespace.

This is somewhat experimental but the short-circuiting *if* statement should cause all existing users of Windows PowerShell (not core) to go through the old code path.  Only PS Core users on LInux/OSX will go through the "id -u" path.  I have tested this on Ubuntu but I don't have a Mac so can't test there.
@rkeithhill rkeithhill merged commit 36ee554 into dahlbyk:master Dec 6, 2016
@rkeithhill rkeithhill deleted the rkeithhill/fix-admin-test-on-non-Windows branch December 6, 2016 04:45
@dahlbyk
Copy link
Owner

dahlbyk commented Dec 29, 2016

Sorry about the whitespace changes. I have VSCode configured to trim trailing whitespace.

No worries. Feel free to use add -p to put whitespace-only changes in separate commits.

@dahlbyk dahlbyk mentioned this pull request Dec 29, 2016
5 tasks
@rkeithhill
Copy link
Collaborator Author

@dahlbyk Thanks. Is that git add -p? I haven't used that before, cool. BTW I'm adding a VSCode settings file for the repo so anybody using VSCode will have trailing whitespace trimmed in the files they edit.

@dahlbyk
Copy link
Owner

dahlbyk commented Dec 30, 2016

Is that git add -p? I haven't used that before, cool.

Yep, many commands (add, reset, checkout, stash at least) accept --patch/-p to let you stage/unstage/discard/stash individual lines (or you can use the e option to apply a change that never existed on disk). I use it all the time.

BTW I'm adding a VSCode settings file for the repo so anybody using VSCode will have trailing whitespace trimmed in the files they edit.

👉 #330

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants