-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
source ~/.jq file on windows (fixes #3104) #3114
Conversation
Possible to add a test for this? we have some $HOME related tests here https://github.com/jqlang/jq/blob/master/tests/shtest#L355 but not sure how messy to emulate a more normal windows env? Otherwise code change look fine with me and thanks for looking into this! |
Ok yeah I did see those tests and briefly puzzled over them running in an msys environment. I will see if I can get at least something simple in there exercising the |
ab33e86
to
4396b78
Compare
Test added (after some minor flopping and twitching). |
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.
Looks good to me! let's see if some other maintainer has opinions
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.
Thank you!
@kirkoman Could you rebase the changes? The dev manual should be updated. |
Forced pushed conflict fix (felt guilty as i was the one who moved the file) |
Thanks! |
Sorry wasn't tuned in. Thanks for the rebase and the merge! |
Sourcing of
~/.jq
(file) was hardwired to use theHOME
environment variable, which is not defined when running in a native Windows shell (PowerShell, CMD). This change lets it check theUSERPROFILE
environment variable and other standard fallbacks.HOME
still has priority if it is set (e.g., in MSYS2 shell).