Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Commit

Permalink
Merge pull request #327 from cloudflare/malonso/feat-better-error-pri…
Browse files Browse the repository at this point in the history
…nting

Better error printing
  • Loading branch information
xortive authored Jul 22, 2019
2 parents ec33a94 + 431fdaa commit b5163cf
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
10 changes: 10 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ number_prefix = "0.3.0"
flate2 = "1.0.7"
base64 = "0.10.1"
lazy_static = "1.3.0"
exitfailure = "0.5.1"

[dev-dependencies]
assert_cmd = "0.11.1"
Expand Down
6 changes: 5 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ mod settings;
mod terminal;

use crate::settings::project::ProjectType;
use exitfailure::ExitFailure;
use terminal::emoji;

fn main() -> Result<(), failure::Error> {
fn main() -> Result<(), ExitFailure> {
env_logger::init();
if let Ok(me) = env::current_exe() {
// If we're actually running as the installer then execute our
Expand All @@ -32,7 +33,10 @@ fn main() -> Result<(), failure::Error> {
installer::install();
}
}
Ok(run()?)
}

fn run() -> Result<(), failure::Error> {
let matches = App::new(format!("{}{} wrangler", emoji::WORKER, emoji::SPARKLES))
.version(env!("CARGO_PKG_VERSION"))
.author("ashley g williams <[email protected]>")
Expand Down
2 changes: 1 addition & 1 deletion src/terminal/emoji.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ pub static SLEUTH: Emoji = Emoji("🕵️‍♂️", "");
pub static SPARKLES: Emoji = Emoji("✨ ", "");
pub static SWIRL: Emoji = Emoji("🌀 ", "");
pub static UP: Emoji = Emoji("🆙 ", "");
pub static WARN: Emoji = Emoji(" ", "");
pub static WARN: Emoji = Emoji("⚠️ ", "");
pub static WAVING: Emoji = Emoji("👋 ", "");
pub static WORKER: Emoji = Emoji("👷 ", "");

0 comments on commit b5163cf

Please sign in to comment.