diff --git a/src/function.rs b/src/function.rs index 7824611..09bd2a1 100644 --- a/src/function.rs +++ b/src/function.rs @@ -14,7 +14,11 @@ impl Function { pub fn exec(&self, pkgdata: &BuildFile) -> Result<(), Box> { // pub fn exec(&self, pkgdata: &BuildFile) -> Result<(), Box> { // Commands to execute - let mut commands = self.commands.clone(); + // let mut commands = self.commands.clone(); + let mut commands = Vec::new(); + commands.push(String::from("set -e")); + commands.push(String::from("fakeroot")); + commands.append(self.commands.clone().as_mut()); commands.push(String::from("exit")); let cmds = &self.commands.join("\n").to_string();