diff options
author | Robert Hensing <robert@roberthensing.nl> | 2023-04-09 22:42:20 +0200 |
---|---|---|
committer | Robert Hensing <robert@roberthensing.nl> | 2023-04-09 22:42:20 +0200 |
commit | 4e0804c920558575a4b3486df1e595445bf67555 (patch) | |
tree | 9dbeb968bb9c3d4a1bc02b49ab2ff219f8e1f065 /src/libstore/derivations.cc | |
parent | 8f0ec323ea0cb4791ca8edfe122b0d7523acfc80 (diff) |
Deduplicate string literal rendering, fix 4909
Diffstat (limited to 'src/libstore/derivations.cc')
-rw-r--r-- | src/libstore/derivations.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libstore/derivations.cc b/src/libstore/derivations.cc index abdfb1978..9948862e5 100644 --- a/src/libstore/derivations.cc +++ b/src/libstore/derivations.cc @@ -313,6 +313,15 @@ Derivation parseDerivation(const Store & store, std::string && s, std::string_vi } +/** + * Print a derivation string literal to an std::string. + * + * This syntax does not generalize to the expression language, which needs to + * escape `$`. + * + * @param res Where to print to + * @param s Which logical string to print + */ static void printString(std::string & res, std::string_view s) { boost::container::small_vector<char, 64 * 1024> buffer; |