Description
The "Prerequisite" sections of the how to run docs (real sled agent, simulated sled agent) recommend using env.sh to setup one's PATH before running the prerequisite scripts in tools (then building and/or running the software).
A couple of things I notice looking at this now:
1. The list of packages that are checked to be in the user's PATH in the prereq scripts is out of sync with env.sh
The items added to PATH here differ from what is checked for by install_builder_prerequisites.sh
(namely, those also check for pg_config
and pkg-config
). This is also true of .envrc
.
I was curious how this worked in CI, as the env.sh
script is also used in CI to configure PATH for various workflows. I spot checked a random clippy-lint job, I see that /usr/bin
is already in PATH, and at least on my linux laptop, that's where pg_config
and pkg-config
live. This is fine for those dependencies, but it might be nice to have crisper representations of what packages we expect to be in PATH here.
2. env.sh
does not work for zsh
users
Per @citrus-it, this script does not work in zsh
shells, because it ends up inserting embedded newlines:
Example:
% echo $PATH
/home/andy/omicron
/home/andy/omicron/out/dendrite-stub/bin:/home/andy/omicron
/home/andy/omicron/out/clickhouse:/home/andy/omicron
/home/andy/omicron/out/cockroachdb/bin:/home/andy/bin:/usr/bin:/usr/sbin:/opt/ooce/bin:/opt/onbld/bin/i386:/opt/onbld/bin:/home/andy/.cargo/bin
I intend to scope out how easy it would be to move this into an xtask (as a part of #3939 or otherwise).