chore: lab verbatim check defaults to $HOME, and the fake private tier is resynced
The default named a real home path in the public tier (SEC-1), and two of the three verbatim copies had drifted from the private repo.
This commit is contained in:
1 parent
d8b0e22052
commit
e7bc5fdaff
3 files changed
+24
-1
No files matched your search
@@ -77,6 +77,12 @@ shquote() {
|
||||
|
||||
[ -r "$TOKEN_FILE" ] || abort "no bws token at $TOKEN_FILE (public-only machine?)"
|
||||
|
||||
# dotup installs bws into ~/.local/bin, and the very first run arrives from
|
||||
# the pre-login shell where ~/.local/bin is NOT on PATH yet -- the same
|
||||
# fresh-box quirk the public README documents for dotup itself. Without this
|
||||
# probe the first apply of a brand-new machine silently ends with no
|
||||
# secrets.zsh (found live 2026-08-22, phase 5 VM).
|
||||
command -v bws >/dev/null 2>&1 || PATH="$HOME/.local/bin:$PATH"
|
||||
command -v bws >/dev/null 2>&1 \
|
||||
|| abort "bws is not installed or not on PATH -- https://bitwarden.com/help/secrets-manager-cli/"
|
||||
|
||||
@@ -158,6 +164,17 @@ while [ "$#" -ge 2 ]; do
|
||||
esac
|
||||
|
||||
value=${line#"$name"=}
|
||||
|
||||
# Newer bws releases wrap the value in double quotes in `-o env` output;
|
||||
# the versions on the existing machines did not. Strip exactly one
|
||||
# symmetric pair, or every consumer gets a key with literal quotes in it
|
||||
# and a 401 that looks like a rotated credential (found live 2026-08-22,
|
||||
# phase 5 VM -- the fake bws in the tests does not quote, so only a real
|
||||
# fresh install could surface it).
|
||||
case $value in
|
||||
\"*\") value=${value#\"}; value=${value%\"} ;;
|
||||
esac
|
||||
|
||||
[ -n "$value" ] || abort "bws returned an empty value for $name"
|
||||
|
||||
printf 'export %s=%s\n' "$name" "$(shquote "$value")" >>"$TMP" \
|
||||
|
||||
Reference in new issue
Block a user