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

Could we get a CARGO_PKG_AUTHORS to complement CARGO_PKG_VERSION? #2441

Closed
rtaycher opened this issue Mar 5, 2016 · 4 comments
Closed

Could we get a CARGO_PKG_AUTHORS to complement CARGO_PKG_VERSION? #2441

rtaycher opened this issue Mar 5, 2016 · 4 comments

Comments

@rtaycher
Copy link

rtaycher commented Mar 5, 2016

CARGO_PKG_VERSION is useful to auto-configure app version in cmd line arguments.

clap-rs has crate_version!() macro which reads the version from the environment instead of specifying it twice and possibly forgetting to update it.

It would be useful to have a CARGO_PKG_AUTHORS.

It's true that authors isn't likely to change for small projects, and only rarely for large ones but it would still help with DRY and prevent larger projects from missing credits.

@alexcrichton
Copy link
Member

Hm how should we encode this as an environment variable? Perhaps comma separated? I guess it'd be pretty rare for someone's name to have a comma in it.

@rtaycher
Copy link
Author

rtaycher commented Mar 6, 2016

Is there anything wrong with doing it like in Cargo (with double quotes) minus newlines:

"author 1", "author 2", "author 3"

Do double quotes in environmental variables cause issues?

@alexcrichton
Copy link
Member

I suppose we could also do that, yeah, just depends on how fancy we want to get.

@TheNeikos
Copy link
Contributor

Oh hey, looks like I'm not the only one who wants this!

TheNeikos added a commit to TheNeikos/cargo that referenced this issue Apr 8, 2016
This will allow crates to use the CARGO_PKG_AUTHORS env variable to get a colon
seperated list of the authors declared in the manifest.

Closes rust-lang#2441
bors added a commit that referenced this issue Apr 8, 2016
Add a new CARGO_PKG_AUTHORS environment variable

This will allow crates to use the CARGO_PKG_AUTHORS env variable to get a comma
seperated list of the authors declared in the manifest.

Closes #2441
@bors bors closed this as completed in #2465 Apr 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants