We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 618159c commit ad6a1adCopy full SHA for ad6a1ad
rust/patchable/src/main.rs
@@ -516,13 +516,11 @@ fn main() -> Result<()> {
516
"creating product configuration directory and file"
517
);
518
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
- })?;
+ if let Some(product_config_dir) = product_config_path.parent() {
+ std::fs::create_dir_all(product_config_dir).context(CreatePatchDirSnafu {
+ path: product_config_dir,
+ })?;
+ }
526
527
let product_config = ProductConfig {
528
upstream,
0 commit comments