wrestic 1.3.0

Restic wrapper built in Rust
1
2
3
4
5
6
7
8
9
10
11
use crate::utils::macros::error;
use anyhow::{Context, Result};
use std::env;

pub fn get_current_shell() -> Result<String> {
    let mut shell = env::var("SHELL").context(error!("Failed getting the current shell."))?;
    if shell.is_empty() {
        shell = "/bin/sh".to_string();
    }
    Ok(shell)
}