-
Notifications
You must be signed in to change notification settings - Fork 2.6k
cargo package: please provide a --list0 option to print NUL-terminated filenames #3306
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Sounds plausible to me! |
Or we could disallow these characters. I haven't seen legitimate use cases for file names with newlines in them, @joshtriplett do you know any? |
On November 21, 2016 2:59:03 PM PST, tbu- notifications@github.com wrote:
Test cases; no other legitimate use that I can think of. |
What should Cargo do for packaging a multi-package workspace for this list mode? Can JSON output (#11666) cover the use case of this? |
FYI the issue for |
I second. While json formatting isn't always the easiest for shell scripts to interact with, it is the primary focus of our programmatic interface and we'd be very limited in what a |
cargo package --list
lists all the filenames the .crate file would include, followed by newlines. A crate could potentially include a file whose name includes a newline, such as for test data. Please consider providing acargo package --list0
option to list filenames followed by NUL characters instead of newlines.(After adding such an option,
cargo package --list
should probably fail with an error and no other output if any filename includes a newline, to catch errors.)The text was updated successfully, but these errors were encountered: