1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-03-05 08:17:01 +00:00

Merge pull request #926 from Rubikoid/rubikoid/offline-flag

Add offline and substituters flags
This commit is contained in:
Michael Hoang 2024-05-20 21:25:19 +10:00 committed by GitHub
commit e1cacc63e6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -12,7 +12,8 @@ showSyntax() {
echo " [--keep-going] [-k] [--keep-failed] [-K] [--fallback] [--show-trace]" >&2
echo " [-I path] [--option name value] [--arg name value] [--argstr name value]" >&2
echo " [--flake flake] [--update-input input flake] [--impure] [--recreate-lock-file]" >&2
echo " [--no-update-lock-file] [--refresh] ..." >&2
echo " [--no-update-lock-file] [--refresh]" >&2
echo " [--offline] [--substituters substituters-list] ..." >&2
exit 1
}
@ -43,7 +44,7 @@ while [ $# -gt 0 ]; do
edit|switch|activate|build|check|changelog)
action=$i
;;
--show-trace|--keep-going|--keep-failed|--verbose|-v|-vv|-vvv|-vvvv|-vvvvv|--fallback)
--show-trace|--keep-going|--keep-failed|--verbose|-v|-vv|-vvv|-vvvv|-vvvvv|--fallback|--offline)
extraMetadataFlags+=("$i")
extraBuildFlags+=("$i")
;;
@ -116,6 +117,15 @@ while [ $# -gt 0 ]; do
fi
shift 1
;;
--substituters)
if [ -z "$1" ]; then
echo "$0: '$i' requires an argument"
exit 1
fi
j=$1; shift 1
extraMetadataFlags+=("$i" "$j")
extraBuildFlags+=("$i" "$j")
;;
*)
echo "$0: unknown option '$i'"
exit 1