Skip to content

Commit

Permalink
Check the commands when asserts are on. (#2569)
Browse files Browse the repository at this point in the history
  • Loading branch information
floitsch authored Oct 14, 2024
1 parent 4890e79 commit 526e165
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tools/toit.toit
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,15 @@ main args/List:

root-command.add system-message.build-command

assert:
// Run the CLI package checks.
// This makes sure that commands without 'run' functionality have
// subcommands, or that examples are valid.
// Otherwise, we could have exceptions when the user tries to run the command
// or tries to generate its help.
// If the check fails, it throws an exception.
root-command.check
true
root-command.run args

bin-dir sdk-dir/string? -> string:
Expand Down

0 comments on commit 526e165

Please sign in to comment.