scud_core 0.13.0

Core library of scud
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::process::Command;

use crate::diagnostics::{log_diagnostic, DiagnosticKind};

pub fn execute_push_dry_run() {
    match Command::new("git").args(["push", "--dry-run"]).status() {
        Ok(status) => {
            if !status.success() {
                panic!("Failed to push files");
            }
        }
        Err(error) => {
            panic!("Failed to push files: {}", error);
        }
    }

    log_diagnostic(DiagnosticKind::DryRun { command: "push" });
}