Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/cmd/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ impl std::fmt::Display for OsedaRunError {
/// * `Ok(())` if both the build and serve steps succeed
/// * `Err(OsedaRunError)` if any step fails (missing vite isn't installed, or `serve` fails to start)
pub fn run() -> Result<(), OsedaRunError> {
// todo refactor the other check command to use this
run_with_shutdown(Arc::new(AtomicBool::new(false)))
}

Expand Down
5 changes: 3 additions & 2 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ pub fn read_config_file<P: AsRef<std::path::Path>>(
))
})?;

let conf: OsedaConfig = serde_json::from_str(&config_str)
.map_err(|_| OsedaCheckError::BadConfig("Could not parse oseda config file".to_owned()))?;
let conf: OsedaConfig = serde_json::from_str(&config_str).map_err(|err| {
OsedaCheckError::BadConfig(format!("Could not parse oseda config file: {}", err).to_owned())
})?;

Ok(conf)
}
Expand Down
5 changes: 3 additions & 2 deletions src/license.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,10 @@ impl std::fmt::Display for License {

// useful for oseda check attempting to parse a license spdx id
impl TryFrom<String> for License {
type Error = strum::ParseError;
type Error = String;

fn try_from(s: String) -> Result<Self, Self::Error> {
s.parse()
s.parse::<Self>()
.map_err(|_| format!("'{}' is not a supported SPDX license identifier", s))
}
}
Loading