Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/get-facts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ hasTar=$(has tar)
hasCpio=$(has cpio)
hasSudo=$(has sudo)
hasDoas=$(has doas)
hasRun0=$(has run0)
hasWget=$(has wget)
hasCurl=$(has curl)
hasSetsid=$(has setsid)
Expand Down
5 changes: 4 additions & 1 deletion src/nixos-anywhere.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ hasTar=
hasCpio=
hasSudo=
hasDoas=
hasRun0=
hasWget=
hasCurl=
hasSetsid=
Expand Down Expand Up @@ -474,7 +475,7 @@ importFacts() {
# shellcheck disable=SC2046
export $(echo "$filteredFacts" | xargs)

for var in isOs isArch isKexec isInstaller isContainer hasIpv6Only hasTar hasCpio hasSudo hasDoas hasWget hasCurl hasSetsid; do
for var in isOs isArch isKexec isInstaller isContainer hasIpv6Only hasTar hasCpio hasSudo hasDoas hasRun0 hasWget hasCurl hasSetsid; do
if [[ -z ${!var} ]]; then
abort "Failed to retrieve fact $var from host"
fi
Expand Down Expand Up @@ -772,6 +773,8 @@ main() {
maybeSudo="sudo"
elif [[ ${hasDoas-n} == "y" ]]; then
maybeSudo="doas"
elif [[ ${hasRun0-n} == "y" ]]; then
maybeSudo="run0"
fi

if [[ ${isOs} != "Linux" ]]; then
Expand Down