pub fn init() -> Result<()> {
    use std::{env, path::Path};

    // Allow shipcat calls to work from anywhere if we know where manifests are
    if let Ok(mdir) = env::var("SHIPCAT_MANIFEST_DIR") {
        let pth = Path::new(&mdir);
        if !pth.is_dir() {
            bail!("SHIPCAT_MANIFEST_DIR must exist");
        }
        env::set_current_dir(pth)?;
    }

    Ok(())
}
/// Smart initialiser with safety
///
/// Tricks the library into reading from your manifest location.
Smart initialiser with safety
Tricks the library into reading from your manifest location.
Smart initialiser with safety Tricks the library into reading from your manifest location .
pub fn init() -> Result<()> {
    use std::{env, path::Path};
    // Allow shipcat calls to work from anywhere if we know where manifests are
    if let Ok(mdir) = env::var("SHIPCAT_MANIFEST_DIR") {
        let pth = Path::new(&mdir);
        if !pth.is_dir() {
            bail!("SHIPCAT_MANIFEST_DIR must exist");
        }
        env::set_current_dir(pth)?;
    }
    Ok(())
}
pub fn init ( ) -> Result < ( ) > { use std :: { env , path :: Path } ; // Allow shipcat calls to work from anywhere if we know where manifests are if let Ok ( mdir ) = env :: var ( " " ) { let pth = Path :: new ( & mdir ) ; if ! pth . is_dir ( ) { bail ! ( " " ) ; } env :: set_current_dir ( pth ) ? ; } Ok ( ( ) ) }
Smart initialiser with safety
Tricks the library into reading from your manifest location.
Smart initialiser with safety Tricks the library into reading from your manifest location .