Fix an issue in parse_netrc that it doesn't support TAB.
PiperOrigin-RevId: 449228171
diff --git a/src/test/shell/bazel/starlark_repository_test.sh b/src/test/shell/bazel/starlark_repository_test.sh
index 084615a..5417940 100755
--- a/src/test/shell/bazel/starlark_repository_test.sh
+++ b/src/test/shell/bazel/starlark_repository_test.sh
@@ -1860,8 +1860,9 @@
login barusername
password passbar
-machine oauthlife.com
-password TOKEN
+# following lines mix tabs and spaces
+machine oauthlife.com
+ password TOKEN
EOF
# Read a given .netrc file and combine it with a list of URL,
# and write the obtained authentication dicionary to disk; this
diff --git a/tools/build_defs/repo/utils.bzl b/tools/build_defs/repo/utils.bzl
index 662310c..c24a9d4 100644
--- a/tools/build_defs/repo/utils.bzl
+++ b/tools/build_defs/repo/utils.bzl
@@ -282,6 +282,8 @@
macdef = None
currentmacro = ""
else:
+ line = line.replace("\t", " ")
+
# Essentially line.split(None) which starlark does not support.
tokens = [
w.strip()