aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index 0cdab68..09a0e83 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -2,11 +2,15 @@ extern crate ilc_cli;
use ilc_cli::Cli;
-static MASTER: &'static str = include_str!("../.git/refs/heads/master");
+static MASTER_HASH: &'static str = include_str!("../.git/refs/heads/master");
fn main() {
ilc_cli::main(Cli {
version: env!("CARGO_PKG_VERSION").into(),
- master_hash: MASTER.trim_right().into(),
+ master_hash: if MASTER_HASH.is_empty() {
+ None
+ } else {
+ Some(MASTER_HASH.trim_right().to_owned())
+ },
});
}