aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/mozart/src/commands/init.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/mozart/src/commands/init.rs')
-rw-r--r--crates/mozart/src/commands/init.rs12
1 files changed, 7 insertions, 5 deletions
diff --git a/crates/mozart/src/commands/init.rs b/crates/mozart/src/commands/init.rs
index 15729a8..dc32c7c 100644
--- a/crates/mozart/src/commands/init.rs
+++ b/crates/mozart/src/commands/init.rs
@@ -162,11 +162,13 @@ fn build_non_interactive(args: &InitArgs, working_dir: &Path) -> anyhow::Result<
.clone()
.or_else(|| std::env::var("COMPOSER_DEFAULT_LICENSE").ok());
if let Some(ref license) = resolved_license
- && !validation::validate_license(license) && !license.eq_ignore_ascii_case("proprietary") {
- bail!(
- "Invalid license provided: {license}. Only SPDX license identifiers (https://spdx.org/licenses/) or \"proprietary\" are accepted."
- );
- }
+ && !validation::validate_license(license)
+ && !license.eq_ignore_ascii_case("proprietary")
+ {
+ bail!(
+ "Invalid license provided: {license}. Only SPDX license identifiers (https://spdx.org/licenses/) or \"proprietary\" are accepted."
+ );
+ }
composer.license = resolved_license;
if let Some(ref stability) = args.stability {