fix disappearing bash arguments

This commit is contained in:
Joel Taylor 2014-08-21 14:06:49 -07:00 committed by Ludovic Courtès
parent d4e7c195fa
commit 8c766e48d5
1 changed files with 7 additions and 2 deletions

View File

@ -2163,8 +2163,13 @@ void DerivationGoal::initChild()
/* Fill in the arguments. */
string builderBasename = baseNameOf(drv.builder);
args.push_back(builderBasename.c_str());
foreach (Strings::iterator, i, drv.args)
args.push_back(rewriteHashes(*i, rewritesToTmp).c_str());
foreach (Strings::iterator, i, drv.args) {
auto re = rewriteHashes(*i, rewritesToTmp);
auto cstr = new char[re.length()+1];
std::strcpy(cstr, re.c_str());
args.push_back(cstr);
}
args.push_back(0);
restoreSIGPIPE();