Skip to content

Commit ad6a1ad

Browse files
dervoetinightkr
andauthored
Update rust/patchable/src/main.rs
Co-authored-by: Natalie Klestrup Röijezon <[email protected]>
1 parent 618159c commit ad6a1ad

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

rust/patchable/src/main.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -516,13 +516,11 @@ fn main() -> Result<()> {
516516
"creating product configuration directory and file"
517517
);
518518

519-
let product_config_dir = product_config_path
520-
.parent()
521-
.expect("product config should have a hard-coded parent");
522-
523-
std::fs::create_dir_all(product_config_dir).context(CreatePatchDirSnafu {
524-
path: product_config_dir,
525-
})?;
519+
if let Some(product_config_dir) = product_config_path.parent() {
520+
std::fs::create_dir_all(product_config_dir).context(CreatePatchDirSnafu {
521+
path: product_config_dir,
522+
})?;
523+
}
526524

527525
let product_config = ProductConfig {
528526
upstream,

0 commit comments

Comments
 (0)