Browse Source

Update

master
Adrian Heine 6 years ago
parent
commit
44ea23c1b5
  1. 2
      src/symbols/factory.rs
  2. 5
      src/symbols/git/checkout.rs
  3. 1
      src/symbols/hook.rs
  4. 2
      src/symbols/owner.rs

2
src/symbols/factory.rs

@ -54,7 +54,7 @@ impl<'b, C: 'b + CommandRunner, R: 'b + SymbolRunner> SymbolFactory<'b, C, R> {
)).into_action(self.symbol_runner)
}
fn get_php_fpm_pool_socket_path<'a>(&'a self, user_name: &'static str) -> String {
pub fn get_php_fpm_pool_socket_path<'a>(&'a self, user_name: &'static str) -> String {
format!("/run/php/{}.sock", user_name)
}

5
src/symbols/git/checkout.rs

@ -51,8 +51,9 @@ impl<'a, C: CommandRunner> Symbol for GitCheckout<'a, C> {
};
}
try!(self._run_in_target_repo(&["fetch", self.source, self.branch]));
let fetch_head = try!(self._run_in_target_repo(&["rev-parse", "FETCH_HEAD"]));
let head = try!(self._run_in_target_repo(&["rev-parse", "HEAD"]));
// git rev-list resolves tag objects
let fetch_head = try!(self._run_in_target_repo(&["rev-list", "-1", "FETCH_HEAD"]));
let head = try!(self._run_in_target_repo(&["rev-list", "-1", "HEAD"]));
Ok(fetch_head == head)
}

1
src/symbols/hook.rs

@ -9,6 +9,7 @@ pub struct Hook<A, B> where A: Symbol, B: Symbol {
b: B
}
// A and B are executed if either A or B are not reached
impl<A, B> Hook<A, B> where A: Symbol, B: Symbol {
pub fn new(a: A, b: B) -> Self {
Hook { a: a, b: b }

2
src/symbols/owner.rs

@ -34,7 +34,7 @@ impl<'a, C: CommandRunner, D> Symbol for Owner<'a, C, D> where D: AsRef<str> + f
}
fn execute(&self) -> Result<(), Box<Error>> {
self.command_runner.run_successfully("chown", &[self.user_name.borrow(), self.path.as_ref()])
self.command_runner.run_successfully("chown", &["-R", self.user_name.borrow(), self.path.as_ref()])
}
fn get_prerequisites(&self) -> Vec<Resource> {

Loading…
Cancel
Save