From 05c17b427d9dc8bf510d58b8169b476f66f5a720 Mon Sep 17 00:00:00 2001 From: mrrbrilliant Date: Fri, 2 Apr 2021 13:56:20 +0700 Subject: [PATCH] added bash set -e and use fakeroot --- src/function.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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();