Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cargo package: please provide a --list0 option to print NUL-terminated filenames #3306

Open
joshtriplett opened this issue Nov 21, 2016 · 3 comments
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-package S-triage Status: This issue is waiting on initial triage.

Comments

@joshtriplett
Copy link
Member

joshtriplett commented Nov 21, 2016

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 a cargo 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.)

@alexcrichton
Copy link
Member

Sounds plausible to me!

@tbu-
Copy link
Contributor

tbu- commented Nov 21, 2016

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?

@joshtriplett
Copy link
Member Author

On November 21, 2016 2:59:03 PM PST, tbu- notifications@github.com wrote:

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?

Test cases; no other legitimate use that I can think of.

@carols10cents carols10cents added C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-package labels Sep 29, 2017
@epage epage added the S-triage Status: This issue is waiting on initial triage. label Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-package S-triage Status: This issue is waiting on initial triage.
Projects
None yet
Development

No branches or pull requests

5 participants