Throw an error if -s is used without a crate
In the future we might want to be smarter and find the crate, but let's at least not ignore the option completely.
This commit is contained in:
parent
2f12c83d14
commit
5a1cde5b8d
1 changed files with 3 additions and 0 deletions
|
@ -178,6 +178,9 @@ def make_diff_metadata(crate, version, patch=False, store=False):
|
|||
if crate.endswith(".crate"):
|
||||
cratef, crate, version = local_crate(crate, version)
|
||||
else:
|
||||
if store:
|
||||
raise ValueError('--store-crate can only be used for a crate')
|
||||
|
||||
toml, crate, version = local_toml(crate, version)
|
||||
diff = make_patch(toml, enabled=patch, tmpfile=True)
|
||||
metadata = Metadata.from_file(toml)
|
||||
|
|
Loading…
Reference in a new issue