News for hackers. Stuff that matters.
Re:Claude Code is all you need by indigodaddy on Monday August 11, 2025 @12:03PM (#44865798)
Does it even work with the &&? Iirc, I've never had luck putting env vars before the && and always had to do it the way you describe
Re:Claude Code is all you need by DiabloD3 on Monday August 11, 2025 @12:27PM (#44866125)
It works because they exported it. VAR=foo bar only sets it for the env passed to that exec or subshell, export VAR=foo && bar adds it to the current env then executes bar.

export VAR=foo && bar is dangerous because it stays set.

Re:Claude Code is all you need by indigodaddy on Monday August 11, 2025 @12:28PM (#44866136)
Ah, that's what I had done wrong, thank you! And agree I wouldn't want to just one-off export it and have it be set, better to not export it for one-liner one-offs for sure