mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-06-21 20:51:01 +00:00
Add --supported-solc-versions CLI command (#260)
### Description Adds `--supported-solc-versions` cli command to return a semver range of supported `solc` versions. Is a hack until #162 is implemented. --------- Co-authored-by: xermicus <cyrill@parity.io>
This commit is contained in:
@@ -19,6 +19,10 @@ pub struct Arguments {
|
||||
#[arg(long = "version")]
|
||||
pub version: bool,
|
||||
|
||||
/// Print supported `solc` versions and exit.
|
||||
#[arg(long = "supported-solc-versions")]
|
||||
pub supported_solc_versions: bool,
|
||||
|
||||
/// Print the licence and exit.
|
||||
#[arg(long = "license")]
|
||||
pub license: bool,
|
||||
@@ -171,6 +175,12 @@ impl Arguments {
|
||||
anyhow::bail!("No other options are allowed while getting the compiler version.");
|
||||
}
|
||||
|
||||
if self.supported_solc_versions && std::env::args().count() > 2 {
|
||||
anyhow::bail!(
|
||||
"No other options are allowed while getting the supported `solc` versions."
|
||||
);
|
||||
}
|
||||
|
||||
#[cfg(debug_assertions)]
|
||||
if self.recursive_process_input.is_some() && !self.recursive_process {
|
||||
anyhow::bail!("--process-input can be only used when --recursive-process is given");
|
||||
|
||||
Reference in New Issue
Block a user