commit | 29c01c229f3a9be973c978fb376072cdc8072e08 | [log] [tgz] |
---|---|---|
author | Klaus Aehlig <aehlig@google.com> | Thu Nov 08 08:42:54 2018 -0800 |
committer | Copybara-Service <copybara-piper@google.com> | Thu Nov 08 08:44:55 2018 -0800 |
tree | 48127c5156f3a505d6e8fa206170567504d84986 | |
parent | ce71c44959883b83e0d36e6b7ac6502e935de4b0 [diff] |
pkg_tar: when passing arguments, quote file names properly The pkg_tar function passes the list of files to be archived as arguments (written to an args file). Moreover, the information which name the file should have in the archive is passed in the same argument, separated by an equal sign. This obviously causes problems if the file name itself contains an equal sign. Fix this, by quoting the file name; to keep the changes to the protocol minimal, just quote the equal sign by backslash, after escaping bachslashes by double-backslashes. (Theoretically, it should not be necessary to keep changes minimal, as both sides of the protocol are embedded in the same Bazel binary---but better safe than sorry.) Fixes #4063 ...well, kind of, execpt that files are passed as labels and hence may not contain a lot of characters. (The fact, that newline characters are not allowed is actually necessary for the concept of the flagfile to no break.) Change-Id: I43bab3a0bc8ce26e170cbad3ae64bccb401e3246 PiperOrigin-RevId: 220643705
{Fast, Correct} - Choose two
Build and test software of any size, quickly and reliably.
Speed up your builds and tests: Bazel only rebuilds what is necessary. With advanced local and distributed caching, optimized dependency analysis and parallel execution, you get fast and incremental builds.
One tool, multiple languages: Build and test Java, C++, Android, iOS, Go, and a wide variety of other language platforms. Bazel runs on Windows, macOS, and Linux.
Scalable: Bazel helps you scale your organization, codebase, and continuous integration solution. It handles codebases of any size, in multiple repositories or a huge monorepo.
Extensible to your needs: Easily add support for new languages and platforms with Bazel's familiar extension language. Share and re-use language rules written by the growing Bazel community.
Follow our tutorials:
See CONTRIBUTING.md
Bazel is released in ‘Beta’. See the product roadmap to learn about the path toward a stable 1.0 release.