aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe')
-rw-r--r--crates/shirabe/src/console/application.rs10
-rw-r--r--crates/shirabe/src/json/json_file.rs4
2 files changed, 4 insertions, 10 deletions
diff --git a/crates/shirabe/src/console/application.rs b/crates/shirabe/src/console/application.rs
index f27ed79..8bd34ad 100644
--- a/crates/shirabe/src/console/application.rs
+++ b/crates/shirabe/src/console/application.rs
@@ -448,17 +448,11 @@ impl Application {
if e.downcast_ref::<NoSslException>().is_some() {
// suppress these as they are not relevant at this point
} else if let Some(pe) = e.downcast_ref::<ParsingException>() {
- // TODO(phase-b): ParsingException::get_details is not yet ported.
- let details: IndexMap<String, PhpMixed> = IndexMap::new();
+ let details = pe.get_details();
let file = realpath(&Factory::get_composer_file().unwrap_or_default());
- let mut line: Option<i64> = None;
- if !details.is_empty() {
- if let Some(l) = details.get("line").and_then(|v| v.as_int()) {
- line = Some(l);
- }
- }
+ let line = details.line;
let mut ghe = GithubActionError::new(self.io.clone());
ghe.emit(&pe.message, file.as_deref(), line);
diff --git a/crates/shirabe/src/json/json_file.rs b/crates/shirabe/src/json/json_file.rs
index 33496df..0b1b010 100644
--- a/crates/shirabe/src/json/json_file.rs
+++ b/crates/shirabe/src/json/json_file.rs
@@ -535,7 +535,7 @@ impl JsonFile {
"The input does not contain valid JSON\n{}",
result.get_message()
),
- None,
+ result.get_details().clone(),
),
Some(f) => ParsingException::new(
format!(
@@ -543,7 +543,7 @@ impl JsonFile {
f,
result.get_message()
),
- None,
+ result.get_details().clone(),
),
}
.into())