From 402e7af28ac8b7d5763387d808ca9703ee1995b6 Mon Sep 17 00:00:00 2001 From: Andrea Ciliberti Date: Thu, 12 May 2022 09:55:48 +0200 Subject: [PATCH] Use parser crate rather than env var --- src/main.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 6e2e160..348306c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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()