Support Pearl (fix #126)

This commit is contained in:
Roey Darwish Dror
2019-02-19 08:47:01 +02:00
parent 13ecb19e29
commit 3ef9166d2b
2 changed files with 10 additions and 1 deletions

View File

@@ -1,7 +1,7 @@
use crate::error::Error;
use crate::executor::{CommandExt, RunType};
use crate::terminal::print_separator;
use crate::utils::which;
use crate::utils::{require, which};
use directories::BaseDirs;
use std::path::Path;
use std::process::Command;
@@ -99,3 +99,10 @@ pub fn run_nix(run_type: RunType) -> Option<(&'static str, bool)> {
None
}
pub fn run_pearl(run_type: RunType) -> Result<(), Error> {
let pearl = require("pearl")?;
print_separator("pearl");
run_type.execute(&pearl).arg("update").check_run()
}