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
For tools that inject themselves via an eval expression in <code>{"~/.zshrc"}</code> — such as <code>nvm</code>, <code>pyenv</code>, or <code>rbenv</code> — you need to move or duplicate that initialization into <code>{"~/.zshenv"}</code> as well:
196
196
</p>
197
197
198
-
```bash
198
+
```shell
199
199
# ~/.zshenv — nvm initialization for non-interactive shells
After saving <code>{"~/.zshenv"}</code>, verify without restarting your terminal:
215
215
</p>
216
216
217
-
```bash
217
+
```shell
218
218
# Reload .zshenv in your current shell
219
219
source~/.zshenv
220
220
@@ -260,7 +260,7 @@ zsh -c 'which node'
260
260
</p>
261
261
262
262
<ul>
263
-
<li>CI/CD pipelines (GitHub Actions, GitLab CI) run commands in non-interactive shells. This is why you often see pipelines that explicitly <code>source ~/.bashrc</code> or set up PATH at the top of every job.</li>
263
+
<li>CI/CD pipelines (GitHub Actions, GitLab CI) run commands in non-interactive shells. This is why you often see pipelines that explicitly <code>source ~/.shellrc</code> or set up PATH at the top of every job.</li>
264
264
<li>Cron jobs run in minimal environments with almost no PATH set.</li>
265
265
<li>VS Code integrated terminal tasks and <code>launch.json</code> configurations may use non-interactive shells depending on the operating system and configuration.</li>
266
266
<li>SSH remote command execution (<code>ssh host 'command'</code>) uses a non-interactive shell unless you pass <code>-t</code> to force a TTY.</li>
@@ -282,7 +282,7 @@ zsh -c 'which node'
282
282
Here is a starting point for a <code>{"~/.zshenv"}</code> that covers the most common developer tools on macOS. Adjust paths to match your actual installations:
283
283
</p>
284
284
285
-
```bash
285
+
```shell
286
286
# ~/.zshenv
287
287
# Sourced for ALL zsh shells — interactive, login, and non-interactive.
288
288
# Keep this file fast and free of output-producing commands.
@@ -320,10 +320,10 @@ export LC_ALL="en_US.UTF-8"
320
320
```
321
321
322
322
<p>
323
-
With this in place, restart Claude Code (or any tool that spawns subshells) and run your verification:
323
+
With this in place, restart Claude Code (or any tool that spawns subshells) and run your verification.
324
324
</p>
325
325
326
-
```bash
326
+
```shell
327
327
zsh -c 'which gh && which go && which node'
328
328
```
329
329
@@ -351,12 +351,12 @@ zsh -c 'which gh && which go && which node'
351
351
The same fix benefits CI pipelines, cron jobs, Makefiles, Docker builds, and any other context where commands run in a non-interactive shell environment.
352
352
</p>
353
353
354
-
<hr />
355
-
356
-
<p>
357
-
<em>
358
-
Exploring AI-assisted development workflows and developer tooling? The <Linkto="/community">Layer5 community</Link> is an active group of platform engineers, open source contributors, and DevOps practitioners. Join us on <ahref="https://slack.layer5.io">Slack</a> to share what you are building and get help when you hit walls like this one. You can also follow the <Linkto="/blog">Layer5 blog</Link> for more practical engineering posts.
359
-
</em>
360
-
</p>
354
+
<divclassName="intro">
355
+
<p>
356
+
<em>
357
+
Exploring AI-assisted development workflows and developer tooling? The <Linkto="/community">Layer5 community</Link> is an active group of platform engineers, open source contributors, and DevOps practitioners. Join us on <ahref="https://slack.layer5.io">Slack</a> to share what you are building and get help when you hit walls like this one. You can also follow the <Linkto="/blog">Layer5 blog</Link> for more practical engineering posts.
0 commit comments