diff options
Diffstat (limited to 'src/input.rs')
-rw-r--r-- | src/input.rs | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/input.rs b/src/input.rs index 09d05a1..d048775 100644 --- a/src/input.rs +++ b/src/input.rs | |||
@@ -46,7 +46,18 @@ impl Input { | |||
46 | } | 46 | } |
47 | 47 | ||
48 | if version { | 48 | if version { |
49 | println!("Modlist by FxQnLr v{}", env!("CARGO_PKG_VERSION")); | 49 | match std::env::var("DEV") { |
50 | Ok(dev) => { | ||
51 | let devint = dev.parse::<i32>().unwrap(); | ||
52 | if devint >= 1 { | ||
53 | println!("Modlist by FxQnLr v{} (DEV)", env!("CARGO_PKG_VERSION")); | ||
54 | } else { | ||
55 | println!("Modlist by FxQnLr v{}", env!("CARGO_PKG_VERSION")); | ||
56 | } | ||
57 | }, | ||
58 | Err(..) => println!("Modlist by FxQnLr v{}", env!("CARGO_PKG_VERSION")), | ||
59 | } | ||
60 | |||
50 | std::process::exit(0); | 61 | std::process::exit(0); |
51 | } | 62 | } |
52 | 63 | ||
@@ -101,6 +112,7 @@ pub enum Subcmd { | |||
101 | Add, | 112 | Add, |
102 | Remove, | 113 | Remove, |
103 | Change, | 114 | Change, |
115 | Version, | ||
104 | Export, | 116 | Export, |
105 | Import, | 117 | Import, |
106 | } | 118 | } |
@@ -111,6 +123,7 @@ impl Subcmd { | |||
111 | "add" => Self::Add, | 123 | "add" => Self::Add, |
112 | "remove" => Self::Remove, | 124 | "remove" => Self::Remove, |
113 | "change" => Self::Change, | 125 | "change" => Self::Change, |
126 | "version" => Self::Version, | ||
114 | "export" => Self::Export, | 127 | "export" => Self::Export, |
115 | "import" => Self::Import, | 128 | "import" => Self::Import, |
116 | _ => return Err(MLError::new(ErrorType::ArgumentError, "SUBCMD_NOT_FOUND")) | 129 | _ => return Err(MLError::new(ErrorType::ArgumentError, "SUBCMD_NOT_FOUND")) |
@@ -132,7 +145,7 @@ pub async fn get_input(config: Cfg) -> Result<(), Box<dyn std::error::Error>> { | |||
132 | modification(config, input).await | 145 | modification(config, input).await |
133 | }, | 146 | }, |
134 | Cmd::List => { | 147 | Cmd::List => { |
135 | list(config, input) | 148 | list(config, input).await |
136 | }, | 149 | }, |
137 | Cmd::Update => { | 150 | Cmd::Update => { |
138 | update(config, input).await | 151 | update(config, input).await |