summaryrefslogtreecommitdiff
path: root/hscript/script_e.cc
diff options
context:
space:
mode:
Diffstat (limited to 'hscript/script_e.cc')
-rw-r--r--hscript/script_e.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/hscript/script_e.cc b/hscript/script_e.cc
index 8bb9196..acaffda 100644
--- a/hscript/script_e.cc
+++ b/hscript/script_e.cc
@@ -481,10 +481,13 @@ bool Script::execute() const {
return false;
}
- std::vector<std::string> params = {"--root", targetDirectory(), "add"};
+ std::vector<std::string> params(this->internal->packages.size() + 3);
+ params[0] = "--root";
+ params[1] = targetDirectory();
+ params[2] = "add";
std::copy(this->internal->packages.begin(),
this->internal->packages.end(),
- params.end());
+ params.begin() + 3);
if(run_command("/sbin/apk", params) != 0) {
EXECUTE_FAILURE("pkginstall");