You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whenever direnv sets the environment on my Mac, it sets a variable called XPC_SERVICE_NAME to 0. This appears to be a variable set by macOS, and without direnv it's set to a value related to the terminal the shell is running in.
To be clear, XPC_SERVICE_NAME is not being explicitly set in my .envrc or .env file. I have tested this with both.
To Reproduce
Steps to reproduce the behavior:
Set up direnv for your shell on macOS Ventura 13.4 (untested on other versions)
In an empty directory (no .envrc file), do echo $XPC_SERVICE_NAME. You should see something like application.com.foo.bar.12345678.12345678, corresponding to your terminal app.
Run touch .envrc.
You should now have an empty .envrc.
direnv should inform you that the file is blocked.
Run direnv allow
You should see direnv load your file
You should also see it export XPC_SERVICE_NAME.
Confirm that echo $XPC_SERVICE_NAME outputs 0.
Expected behavior
No environment variables should be set, as none were defined in the .envrc file.
Environment
OS: macos Ventura 13.4
Shell: fish (also tested in bash)
Direnv version: 2.32.3
Additional context
I would guess that this has something to do with spawning the subshell; however, just starting bash doesn't seem to cause the XPC_SERVICE_NAME variable to change.
Note that though the steps to reproduce use an empty .envrc, this also occurs when variables are set in it.
In terms of prioritisation, this is not currently causing any issues for me, just noise in direnv's output when changing directories. That could change – I don't know what programs might rely on the value of XPC_SERVICE_NAME.
The text was updated successfully, but these errors were encountered:
Describe the bug
Whenever direnv sets the environment on my Mac, it sets a variable called
XPC_SERVICE_NAME
to0
. This appears to be a variable set by macOS, and without direnv it's set to a value related to the terminal the shell is running in.To be clear,
XPC_SERVICE_NAME
is not being explicitly set in my.envrc
or.env
file. I have tested this with both.To Reproduce
Steps to reproduce the behavior:
.envrc
file), doecho $XPC_SERVICE_NAME
. You should see something likeapplication.com.foo.bar.12345678.12345678
, corresponding to your terminal app.touch .envrc
..envrc
.direnv allow
XPC_SERVICE_NAME
.echo $XPC_SERVICE_NAME
outputs0
.Expected behavior
No environment variables should be set, as none were defined in the
.envrc
file.Environment
Additional context
I would guess that this has something to do with spawning the subshell; however, just starting bash doesn't seem to cause the
XPC_SERVICE_NAME
variable to change.Note that though the steps to reproduce use an empty
.envrc
, this also occurs when variables are set in it.In terms of prioritisation, this is not currently causing any issues for me, just noise in direnv's output when changing directories. That could change – I don't know what programs might rely on the value of
XPC_SERVICE_NAME
.The text was updated successfully, but these errors were encountered: