Browse Source

Merge pull request #17 from Meziu/fix/optional-authors

Use optional env var rather than cargo_metadata
pull/19/head
Meziu 3 years ago committed by GitHub
parent
commit
5eac661e22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      src/main.rs

7
src/main.rs

@ -296,9 +296,14 @@ fn get_metadata(messages: &[Message]) -> CTRConfig { @@ -296,9 +296,14 @@ fn get_metadata(messages: &[Message]) -> CTRConfig {
_ => artifact.target.name,
};
let author = match package.authors.as_slice() {
[name, ..] => name.to_owned(),
[] => String::from("Unspecified Author"), // as standard with the devkitPRO toolchain
};
CTRConfig {
name,
author: package.authors[0].clone(),
author,
description: package
.description
.clone()

Loading…
Cancel
Save