mirror of
https://github.com/taiki-e/install-action.git
synced 2026-04-18 20:02:36 +08:00
codegen: Clean up error handling and move some checks to appropriate
place Unless error handling is done in particular care, in private tools this approach tends to make debugging easier when failed.
This commit is contained in:
@@ -61,6 +61,18 @@ impl BaseManifest {
|
||||
if self.platform.is_empty() {
|
||||
panic!("At least one platform must be specified");
|
||||
}
|
||||
if let Some(website) = &self.website {
|
||||
if website.is_empty() || *website == self.repository {
|
||||
panic!(
|
||||
"Please do not put the repository in website, or set website to an empty value"
|
||||
);
|
||||
}
|
||||
}
|
||||
if let Some(license_markdown) = &self.license_markdown {
|
||||
if license_markdown.is_empty() {
|
||||
panic!("license_markdown can not be an empty value");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user