diff options
Diffstat (limited to 'crates/shirabe/src/config/json_config_source.rs')
| -rw-r--r-- | crates/shirabe/src/config/json_config_source.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/crates/shirabe/src/config/json_config_source.rs b/crates/shirabe/src/config/json_config_source.rs index 0257ee31..59146630 100644 --- a/crates/shirabe/src/config/json_config_source.rs +++ b/crates/shirabe/src/config/json_config_source.rs @@ -148,11 +148,16 @@ impl JsonConfigSource { }; // restore contents to the original state file_put_contents(self.file.borrow().get_path(), contents.as_bytes()); - return Err(RuntimeException::new(format!( + let message = format!( "Failed to update composer.json with a valid format, reverting to the original content. Please report an issue to us with details (command you run and a copy of your composer.json). {}{}", PHP_EOL, implode(PHP_EOL, jve.get_errors()), - )) + ); + return Err(RuntimeException::with_code_and_previous( + message, + 0, + Some(std::sync::Arc::new(e)), + ) .into()); } } |
