summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.travis.yml6
-rw-r--r--Cargo.toml1
-rw-r--r--src/main.rs2
-rw-r--r--src/utils/error.rs11
4 files changed, 19 insertions, 1 deletions
diff --git a/.travis.yml b/.travis.yml
index ec07db4b..cd33a1f1 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -37,6 +37,9 @@ matrix:
rust: nightly
before_script: rustup target add $TARGET
script: cargo build --release --target $TARGET
+ on:
+ branch: master
+ tags: true
addons:
apt:
packages:
@@ -49,6 +52,9 @@ matrix:
rust: nightly
before_script: rustup target add $TARGET
script: cargo build --release --target $TARGET
+ on:
+ branch: master
+ tags: true
<<: *DEPLOY_TO_GITHUB
notifications:
diff --git a/Cargo.toml b/Cargo.toml
index 73d1ef7b..bcd13962 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -25,6 +25,7 @@ heim = "0.0.7"
heim-common = "0.0.7"
log = "0.4"
rayon = "1.2"
+regex = "1.3.1"
sysinfo = "0.9.4"
tokio = "0.2.0-alpha.4"
winapi = "0.3.8"
diff --git a/src/main.rs b/src/main.rs
index bb57c1d2..d9825b10 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -34,7 +34,7 @@ enum Event<I, J> {
}
fn main() -> error::Result<()> {
- let _log = utils::logging::init_logger(); // TODO: Note this could fail and we wouldn't know... consider whether it is worth dealing with
+ utils::logging::init_logger()?;
// Parse command line options
let matches = clap_app!(app =>
diff --git a/src/utils/error.rs b/src/utils/error.rs
index ed829c3e..b38cf962 100644
--- a/src/utils/error.rs
+++ b/src/utils/error.rs
@@ -32,6 +32,11 @@ pub enum RustopError {
/// The data provided is the error found.
#[fail(display = "ERROR: Invalid generic error: {}", message)]
GenericError { message : String },
+ /// An error to represent errors with fern
+ ///
+ /// The data provided is the error found.
+ #[fail(display = "ERROR: Invalid fern error: {}", message)]
+ FernError { message : String },
}
impl From<std::io::Error> for RustopError {
@@ -63,3 +68,9 @@ impl From<std::string::String> for RustopError {
RustopError::GenericError { message : err.to_string() }
}
}
+
+impl From<fern::InitError> for RustopError {
+ fn from(err : fern::InitError) -> Self {
+ RustopError::FernError { message : err.to_string() }
+ }
+}