Skip to content

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

Merged
rkeithhill merged 1 commit into
dahlbyk:masterfrom
rkeithhill:rkeithhill/fix-admin-test-on-non-Windows
Dec 6, 2016
Merged

Fix error when testing for admin on PSCore Linux.#312
rkeithhill merged 1 commit into
dahlbyk:masterfrom
rkeithhill:rkeithhill/fix-admin-test-on-non-Windows

Conversation

@rkeithhill

Copy link
Copy Markdown
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

dahlbyk commented Dec 29, 2016

Copy link
Copy Markdown
Owner

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
Copy Markdown
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

dahlbyk commented Dec 30, 2016

Copy link
Copy Markdown
Owner

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

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