mirror of
https://github.com/LnL7/nix-darwin.git
synced 2024-09-11 12:49:18 +03:00
Merge pull request #544 from PhotonQuantum/fix-darwin-rebuild
Fix darwin rebuild fails with flake and dry-run
This commit is contained in:
commit
cfc0125eaf
@ -19,6 +19,7 @@ showSyntax() {
|
||||
|
||||
# Parse the command line.
|
||||
origArgs=("$@")
|
||||
extraMetadataFlags=()
|
||||
extraBuildFlags=()
|
||||
extraLockFlags=()
|
||||
extraProfileFlags=()
|
||||
@ -35,7 +36,11 @@ while [ $# -gt 0 ]; do
|
||||
edit|switch|activate|build|check|changelog)
|
||||
action=$i
|
||||
;;
|
||||
--show-trace|--no-build-hook|--dry-run|--keep-going|-k|--keep-failed|-K|--verbose|-v|-vv|-vvv|-vvvv|-vvvvv|--fallback|-Q)
|
||||
--show-trace|--keep-going|--keep-failed|--verbose|-v|-vv|-vvv|-vvvv|-vvvvv|--fallback)
|
||||
extraMetadataFlags+=("$i")
|
||||
extraBuildFlags+=("$i")
|
||||
;;
|
||||
--no-build-hook|--dry-run|-k|-K|-Q)
|
||||
extraBuildFlags+=("$i")
|
||||
;;
|
||||
-j[0-9]*)
|
||||
@ -57,6 +62,7 @@ while [ $# -gt 0 ]; do
|
||||
j=$1
|
||||
k=$2
|
||||
shift 2
|
||||
extraMetadataFlags+=("$i" "$j" "$k")
|
||||
extraBuildFlags+=("$i" "$j" "$k")
|
||||
;;
|
||||
--flake)
|
||||
@ -132,7 +138,7 @@ if [ -n "$flake" ]; then
|
||||
cmd=info
|
||||
fi
|
||||
|
||||
flake=$(nix "${flakeFlags[@]}" flake "$cmd" --json "${extraBuildFlags[@]}" "${extraLockFlags[@]}" -- "$flake" | jq -r .url)
|
||||
flake=$(nix "${flakeFlags[@]}" flake "$cmd" --json "${extraMetadataFlags[@]}" "${extraLockFlags[@]}" -- "$flake" | jq -r .url)
|
||||
fi
|
||||
|
||||
if [ "$action" != build ] && [ -z "$flake" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user