mirror of
https://github.com/nix-community/disko.git
synced 2026-12-01 21:43:29 +01:00
disko2: Handle too many arguments error
This commit is contained in:
1 parent
196c746f7e
commit
6f579bd98a
3 files changed
+38
-4
No files matched your search
@@ -27,7 +27,13 @@ export def run [
|
||||
if not ($args.flake? != null xor $args.disko_file? != null) {
|
||||
return {
|
||||
success: false,
|
||||
messages: [ { code: ERR_MISSING_ARGUMENTS } ],
|
||||
messages: [
|
||||
{
|
||||
code: (
|
||||
if ($args.flake? == null) { 'ERR_MISSING_ARGUMENTS' } else { 'ERR_TOO_MANY_ARGUMENTS' }
|
||||
)
|
||||
}
|
||||
],
|
||||
context: "validate arguments"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user