aboutsummaryrefslogtreecommitdiff
path: root/src/bin/activate.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/bin/activate.rs (renamed from src/activate.rs)18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/activate.rs b/src/bin/activate.rs
index 49d16af..554702c 100644
--- a/src/activate.rs
+++ b/src/bin/activate.rs
@@ -26,9 +26,6 @@ extern crate log;
#[macro_use]
extern crate serde_derive;
-#[macro_use]
-mod utils;
-
/// Remote activation utility for deploy-rs
#[derive(Clap, Debug)]
#[clap(version = "1.0", author = "Serokell <https://serokell.io/>")]
@@ -225,7 +222,7 @@ pub async fn activation_confirmation(
confirm_timeout: u16,
closure: String,
) -> Result<(), ActivationConfirmationError> {
- let lock_path = utils::make_lock_path(&temp_path, &closure);
+ let lock_path = deploy::make_lock_path(&temp_path, &closure);
debug!("Ensuring parent directory exists for canary file");
@@ -288,7 +285,7 @@ pub enum WaitError {
Waiting(#[from] DangerZoneError),
}
pub async fn wait(temp_path: String, closure: String) -> Result<(), WaitError> {
- let lock_path = utils::make_lock_path(&temp_path, &closure);
+ let lock_path = deploy::make_lock_path(&temp_path, &closure);
let (created, done) = mpsc::channel(1);
@@ -436,12 +433,12 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
let opts: Opts = Opts::parse();
- utils::init_logger(
+ deploy::init_logger(
opts.debug_logs,
opts.log_dir.as_deref(),
match opts.subcmd {
- SubCommand::Activate(_) => utils::LoggerType::Activate,
- SubCommand::Wait(_) => utils::LoggerType::Wait,
+ SubCommand::Activate(_) => deploy::LoggerType::Activate,
+ SubCommand::Wait(_) => deploy::LoggerType::Wait,
},
)?;
@@ -464,7 +461,10 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
match r {
Ok(()) => (),
- Err(err) => good_panic!("{}", err),
+ Err(err) => {
+ error!("{}", err);
+ std::process::exit(1)
+ }
}
Ok(())