parseFlags (src/cli/index.ts) sets boolean flags before it ever looks at an = value:
if (BOOLEAN_FLAGS.has(name)) {
flags.set(name, '');
continue;
}
So --check=false enables the check, and --help=no prints the help. The value is not rejected, not warned about, just dropped — and for --check the CLI then exits 1 on drift, which is the opposite of what the user asked for. In CI that reads as a failing build with no explanation.
Reproduction
$ owlsql generate --url … --check=false
./schema.ts is out of date - run generate to update it: …
$ echo $?
1
Suggested behaviour
Reject a value on a boolean flag the way an unknown flag is already rejected:
Error: --check does not take a value.
(Accepting --check=true|false would work too, but rejecting is smaller and matches the existing "unexpected argument" / "duplicate flag" error style.)
Found in an audit of master @ dc1afdb (v0.1.8).
parseFlags(src/cli/index.ts) sets boolean flags before it ever looks at an=value:So
--check=falseenables the check, and--help=noprints the help. The value is not rejected, not warned about, just dropped — and for--checkthe CLI then exits 1 on drift, which is the opposite of what the user asked for. In CI that reads as a failing build with no explanation.Reproduction
Suggested behaviour
Reject a value on a boolean flag the way an unknown flag is already rejected:
(Accepting
--check=true|falsewould work too, but rejecting is smaller and matches the existing "unexpected argument" / "duplicate flag" error style.)Found in an audit of
master@ dc1afdb (v0.1.8).