Skip to content

Commit 94d9391

Browse files
fix: crash on dump file with empty path (closed #78)
1 parent 5097d78 commit 94d9391

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

src/main.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ fn main() -> Result<()> {
8383

8484
runner.run().context("runner failed")?;
8585

86-
if let Some(path) = dump_path {
86+
if let Some(path) = dump_path
87+
&& !path.as_os_str().is_empty()
88+
{
8789
runner
8890
.curve()
8991
.export(&path, CurveFormat::from(dump_format))

src/ui/cli/wizard/wizard.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,6 @@ pub fn prompt_choice<C: UIChoice, D: PromptDriver>(driver: &D) -> Result<C> {
149149

150150
if let Some(idx) = none_idx {
151151
if selected == "— none —" && start_idx == idx {
152-
// treat "none" as absence; skip insert by returning None
153-
// (the outer `if let Some(val)` will just not insert)
154-
// If you prefer explicit null, return Some(Value::Null) here.
155152
None
156153
} else if selected == "— none —" {
157154
None

0 commit comments

Comments
 (0)