aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/builtins/buildenv.cc
diff options
context:
space:
mode:
authorBen Burdette <bburdette@gmail.com>2020-04-21 17:07:07 -0600
committerBen Burdette <bburdette@gmail.com>2020-04-21 17:07:07 -0600
commite4fb9a38493a041861fe5c75bc8ddd129a2e5262 (patch)
tree114bedc4dd31da6ebaf6e9b2ebe5f3d6b7b6d274 /src/libstore/builtins/buildenv.cc
parentd3052197feababc312fd874e08ae48050d985eb3 (diff)
remove 'format' from Error constructor calls
Diffstat (limited to 'src/libstore/builtins/buildenv.cc')
-rw-r--r--src/libstore/builtins/buildenv.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libstore/builtins/buildenv.cc b/src/libstore/builtins/buildenv.cc
index 1b802d908..000769094 100644
--- a/src/libstore/builtins/buildenv.cc
+++ b/src/libstore/builtins/buildenv.cc
@@ -72,15 +72,15 @@ static void createLinks(State & state, const Path & srcDir, const Path & dstDir,
if (!S_ISDIR(lstat(target).st_mode))
throw Error("collision between '%1%' and non-directory '%2%'", srcFile, target);
if (unlink(dstFile.c_str()) == -1)
- throw SysError(format("unlinking '%1%'") % dstFile);
+ throw SysError("unlinking '%1%'", dstFile);
if (mkdir(dstFile.c_str(), 0755) == -1)
- throw SysError(format("creating directory '%1%'"));
+ throw SysError("creating directory '%1%'", dstFile);
createLinks(state, target, dstFile, state.priorities[dstFile]);
createLinks(state, srcFile, dstFile, priority);
continue;
}
} else if (errno != ENOENT)
- throw SysError(format("getting status of '%1%'") % dstFile);
+ throw SysError("getting status of '%1%'", dstFile);
}
else {
@@ -99,11 +99,11 @@ static void createLinks(State & state, const Path & srcDir, const Path & dstDir,
if (prevPriority < priority)
continue;
if (unlink(dstFile.c_str()) == -1)
- throw SysError(format("unlinking '%1%'") % dstFile);
+ throw SysError("unlinking '%1%'", dstFile);
} else if (S_ISDIR(dstSt.st_mode))
throw Error("collision between non-directory '%1%' and directory '%2%'", srcFile, dstFile);
} else if (errno != ENOENT)
- throw SysError(format("getting status of '%1%'") % dstFile);
+ throw SysError("getting status of '%1%'", dstFile);
}
createSymlink(srcFile, dstFile);