aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/package/loader/array_loader.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/src/package/loader/array_loader.rs')
-rw-r--r--crates/shirabe/src/package/loader/array_loader.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/crates/shirabe/src/package/loader/array_loader.rs b/crates/shirabe/src/package/loader/array_loader.rs
index 0411645..844b3ef 100644
--- a/crates/shirabe/src/package/loader/array_loader.rs
+++ b/crates/shirabe/src/package/loader/array_loader.rs
@@ -385,14 +385,13 @@ impl ArrayLoader {
return Err(UnexpectedValueException {
message: format!(
"Package {}'s source key should be specified as {{\"type\": ..., \"url\": ..., \"reference\": ...}},\n{} given.",
- PhpMixed::String(
+
config
.get("name")
.and_then(|v| v.as_string())
.unwrap_or("")
.to_string(),
- ),
- PhpMixed::String(json_encode(&source).unwrap_or_default()),
+ json_encode(&source).unwrap_or_default(),
),
code: 0,
}
@@ -428,14 +427,13 @@ impl ArrayLoader {
return Err(UnexpectedValueException {
message: format!(
"Package {}'s dist key should be specified as {{\"type\": ..., \"url\": ..., \"reference\": ..., \"shasum\": ...}},\n{} given.",
- PhpMixed::String(
+
config
.get("name")
.and_then(|v| v.as_string())
.unwrap_or("")
.to_string(),
- ),
- PhpMixed::String(json_encode(&dist).unwrap_or_default()),
+ json_encode(&dist).unwrap_or_default(),
),
code: 0,
}