about summary refs log tree commit diff
path: root/third_party/nix/src/nix/repl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/src/nix/repl.cc')
-rw-r--r--third_party/nix/src/nix/repl.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/third_party/nix/src/nix/repl.cc b/third_party/nix/src/nix/repl.cc
index 87caf9dd3f..5db9468fdc 100644
--- a/third_party/nix/src/nix/repl.cc
+++ b/third_party/nix/src/nix/repl.cc
@@ -5,6 +5,7 @@
 #include <iostream>
 #include <utility>
 
+#include <absl/strings/ascii.h>
 #include <glog/logging.h>
 
 #ifdef READLINE
@@ -122,7 +123,7 @@ void printHelp() {
 }
 
 string removeWhitespace(string s) {
-  s = chomp(s);
+  s = absl::StripTrailingAsciiWhitespace(s);
   size_t n = s.find_first_not_of(" \n\r\t");
   if (n != string::npos) {
     s = string(s, n);