Skip to content

Commit be969b0

Browse files
committed
error if --disko-mode and --store-paths are both set
1 parent 9afe1f9 commit be969b0

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/nixos-anywhere.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ enableDebug=""
1111
nixBuildFlags=()
1212
diskoAttr=""
1313
diskoScript=""
14-
diskoMode="disko"
14+
diskoMode=""
1515
diskoDeps=y
1616
nixosSystem=""
1717
extraFiles=""
@@ -358,6 +358,14 @@ parseArgs() {
358358

359359
diskoAttr="${diskoMode}Script"
360360

361+
if [[ ${diskoMode} != "" ]]; then
362+
if [[ ${diskoScript} != "" ]]; then
363+
abort "--disko-mode cannot be used if --store-paths is used"
364+
fi
365+
else
366+
diskoMode=disko
367+
fi
368+
361369
if [[ ${diskoDeps} == "n" ]]; then
362370
diskoAttr="${diskoAttr}NoDeps"
363371
fi

0 commit comments

Comments
 (0)