Commit b9efd1f4 authored by Jeff Grafton's avatar Jeff Grafton

workspace mirror: add trailing newline to urls list

parent 8bf47d72
......@@ -39,7 +39,11 @@ def export_urls_impl(repo_ctx):
repo_ctx.file(repo_ctx.path("BUILD.bazel"), """
exports_files(glob(["**"]), visibility=["//visibility:public"])
""")
repo_ctx.file(repo_ctx.path("urls.txt"), content = "\n".join(repo_ctx.attr.urls))
repo_ctx.file(
repo_ctx.path("urls.txt"),
# Add a trailing newline, since the "while read" loop needs it
content = ("\n".join(repo_ctx.attr.urls) + "\n"),
)
_export_urls = repository_rule(
attrs = {
......
......@@ -19,7 +19,7 @@ set -o nounset
set -o pipefail
if [[ $# -ne 1 ]]; then
echo 'use "bazel run //build:update-mirror"'
echo 'use "bazel run //hack:update-mirror"'
echo "(usage: $0 <file with list of URLs to mirror>)"
exit 1
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment