disko2: Handle too many arguments error

This commit is contained in:
Felix Uhl committed 2024-10-27 20:40:47 +01:00
1 parent 196c746f7e
commit 6f579bd98a
3 files changed
+38 -4

No files matched your search

+7 -1
View File
@@ -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"
}
}