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

~/.jq is not sourced on windows #3104

Open
kirkoman opened this issue May 1, 2024 · 0 comments
Open

~/.jq is not sourced on windows #3104

kirkoman opened this issue May 1, 2024 · 0 comments
Labels

Comments

@kirkoman
Copy link

kirkoman commented May 1, 2024

On Windows, ~/.jq when it is present as a file should be sourced automatically, but it is not.

To be clear, $HOME/.jq is sourced, however HOME is not a standard environment variable on Windows, you must set it manually. The corresponding environment variable on Windows is USERPROFILE.

To Reproduce

# ~/.jq:
def a:
  "a";
C:\Users\me>jq -n "a"
jq: error: a/0 is not defined at <top-level>, line 1:
a
jq: 1 compile error

C:\Users\me>set HOME=%USERPROFILE%

C:\Users\me>jq -n "a"
"a"

Environment

  • Windows 11
  • jq 1.7.1
@itchyny itchyny added the windows label May 1, 2024
kirkoman added a commit to kirkoman/jq that referenced this issue May 7, 2024
kirkoman added a commit to kirkoman/jq that referenced this issue May 7, 2024
kirkoman added a commit to kirkoman/jq that referenced this issue May 9, 2024
kirkoman added a commit to kirkoman/jq that referenced this issue May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants