utPLSQL / utPLSQL-cli

Command line client for invoking utPLSQL
Apache License 2.0
40 stars 15 forks source link

Cannot run `--tags` starting with a negated tag #201

Closed pesse closed 2 years ago

pesse commented 2 years ago

The following call leads to CLI not recognizing the parameters:

utplsql run user/pass@localhost -p="mypath" --tags="-dontwantthattag"

leads to

Expected parameter for option '--tags' but found '-dontwantthattag'
Usage: utplsql run [-f=<format> [-o=<outputFile>] [-s]]...
...
pesse commented 2 years ago

The problem does not lie within the code but within how CMD interprets command line arguments (interesting read: http://windowsinspired.com/understanding-the-command-line-string-and-arguments-received-by-a-windows-program/)

In this case, we want to pass the quotes to the program input (because we need to quote the value itself, not the argument), so we should use:

utplsql run user/pass@localhost -p="mypath" --tags=\"-dontwantthattag\"