Update
This commit is contained in:
parent
7bd45e2888
commit
44ea23c1b5
4 changed files with 6 additions and 4 deletions
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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 }
|
||||
|
|
|
|||
|
|
@ -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…
Add table
Add a link
Reference in a new issue