This is a breaking change to the CLI. Under the new rules:
You must provide exactly one of a module config file and a bindle ID.
If you provide a bindle ID, you must provide exactly one of a standalone directory or server URL.
The module file and Bindle server URL are no longer defaulted.
It is no longer an error to have the BINDLE_URL EV defined when you are using a module config file. (It is an error to pass --bindle-path because that can only happen via an explicit action; because of Clap limitations, though, it is not an error to pass --bindle-url on the CLI.)
The resulting behaviour is:
# Didn't pass anything - NOW AN ERROR, no longer defaults to ./modules.toml
13:01 $ ./target/debug/wagi
error: The following required arguments were not provided:
<--config <MODULES_TOML>|--bindle <BINDLE_ID>>
USAGE:
wagi [OPTIONS] <--config <MODULES_TOML>|--bindle <BINDLE_ID>>
# --------------------------------------------------------------------------------
# Passed module file only - HAPPY PATH
13:01 $ ./target/debug/wagi -c foo.toml
# --------------------------------------------------------------------------------
# Passed a module file and bindle ID - STILL AN ERROR, new message
13:01 $ ./target/debug/wagi -b foo/1.2.3 -c foo.toml
error: The argument '--config <MODULES_TOML>' cannot be used with one or more of the other specified arguments
USAGE:
wagi <--bindle-path <bindle_path>|--bindle-url <BINDLE_URL>> <--config <MODULES_TOML>|--bindle <BINDLE_ID>>
# --------------------------------------------------------------------------------
# Passed both a module file and bindle directory - STILL AN ERROR though the message is a bit misleading
13:04 $ ./target/debug/wagi -c foo.toml --bindle-path foo
error: The following required arguments were not provided:
--bindle <BINDLE_ID>
<--bindle-path <bindle_path>|--bindle-url <BINDLE_URL>>
USAGE:
wagi <--bindle-path <bindle_path>|--bindle-url <BINDLE_URL>> <--config <MODULES_TOML>|--bindle <BINDLE_ID>>
# --------------------------------------------------------------------------------
# Passed both a module file and bindle URL - NOW ALLOWED
13:05 $ ./target/debug/wagi -c foo.toml --bindle-url foo
# --------------------------------------------------------------------------------
# Passed only a bindle ID - NOW AN ERROR, no longer defaults server URL
13:01 $ ./target/debug/wagi -b foo/1.2.3
error: The following required arguments were not provided:
<--bindle-path <bindle_path>|--bindle-url <BINDLE_URL>>
USAGE:
wagi <--bindle-path <bindle_path>|--bindle-url <BINDLE_URL>> <--config <MODULES_TOML>|--bindle <BINDLE_ID>>
# --------------------------------------------------------------------------------
# Passed bindle ID and standalone directory - HAPPY PATH
13:02 $ ./target/debug/wagi -b foo/1.2.3 --bindle-path foo
# --------------------------------------------------------------------------------
# Passed bindle ID and server URL - HAPPY PATH
13:04 $ ./target/debug/wagi -b foo/1.2.3 --bindle-url foo
# --------------------------------------------------------------------------------
# Passed bindle ID and standalone directory *and* server URL - STILL AN ERROR, new message
13:04 $ ./target/debug/wagi -b foo/1.2.3 --bindle-path foo --bindle-url foo
error: The argument '--bindle-path <bindle_path>' cannot be used with one or more of the other specified arguments
USAGE:
wagi <--bindle-path <bindle_path>|--bindle-url <BINDLE_URL>> <--config <MODULES_TOML>|--bindle <BINDLE_ID>>
This is a breaking change to the CLI. Under the new rules:
BINDLE_URL
EV defined when you are using a module config file. (It is an error to pass--bindle-path
because that can only happen via an explicit action; because of Clap limitations, though, it is not an error to pass--bindle-url
on the CLI.)The resulting behaviour is: