about summary refs log tree commit diff
path: root/third_party/nix/src/nix-build
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2020-05-24T00·36+0100
committerVincent Ambo <tazjin@google.com>2020-05-24T01·13+0100
commit06d7b4aebd9e4a1a87f77fe59a8c08392318be5d (patch)
tree264bfbef18b5b93596d6eb805fc9e5647ddadb4b /third_party/nix/src/nix-build
parent10481d25861f1c25b53cfbd8119199ef2e918f9f (diff)
refactor(3p/nix/libutil): Replace chomp() with absl::strings r/835
Diffstat (limited to 'third_party/nix/src/nix-build')
-rw-r--r--third_party/nix/src/nix-build/nix-build.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/third_party/nix/src/nix-build/nix-build.cc b/third_party/nix/src/nix-build/nix-build.cc
index 66947051ba32..a98603f35109 100644
--- a/third_party/nix/src/nix-build/nix-build.cc
+++ b/third_party/nix/src/nix-build/nix-build.cc
@@ -5,6 +5,7 @@
 #include <sstream>
 #include <vector>
 
+#include <absl/strings/ascii.h>
 #include <glog/logging.h>
 
 #include "affinity.hh"
@@ -121,7 +122,7 @@ static void _main(int argc, char** argv) {
         }
         args.clear();
         for (auto line : lines) {
-          line = chomp(line);
+          line = absl::StripTrailingAsciiWhitespace(line);
           std::smatch match;
           if (std::regex_match(line, match,
                                std::regex("^#!\\s*nix-shell (.*)$"))) {