-
Notifications
You must be signed in to change notification settings - Fork 493
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
chezmoi cd
errors with chezmoi: already in a chezmoi subshell
when in a different subshell
#3410
Comments
What is the output of |
So it works when run edit: it is not set when open a new terminal in iTerm Output of
|
This means that |
Yep that must've been it. I haven't edited my dotfiles in a couple week, but I guess I haven't quit vscode since then. Thanks! (I'll go set my chezmoi editor to vscode now lol) |
Thanks for the investigation. On reflection, I don't think the "already in a chezmoi subshell" error is needed. I'll remove it. |
Describe the bug
When I try to run
chezmoi cd
from the vscode integrated terminal, it fails with the messagechezmoi: already in a chezmoi subshell
. I know that a brand new terminal in vscode (running zsh on macos) has a$SHLVL
of 4, so if chezmoi uses that to detect if it's in a subshell then I could see how that would cause a problem.If that is why it's failing, would it be possible to set an environment variable as a flag for whether a
chezmoi cd
subshell is active so that it's still possible to run it inside other, unrelated, subshells?The text was updated successfully, but these errors were encountered: