Skip to content

Commit e31c396

Browse files
committed
mc: fix logic to determine when to emit JANI
after the latest changes, we always created a tempdir and thus always ran the JANI translation. now we don't anymore.
1 parent 2c7d593 commit e31c396

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/main.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,9 @@ pub struct ResourceLimitOptions {
186186
pub mem_limit: u64,
187187
}
188188

189-
#[derive(Debug, Clone, Copy, PartialEq, Eq, Default, ValueEnum)]
189+
#[derive(Debug, Clone, Copy, PartialEq, Eq, ValueEnum)]
190190
pub enum RunWhichStorm {
191191
/// Look for the Storm binary in the PATH.
192-
#[default]
193192
Path,
194193
/// Run Storm using Docker, with the `movesrwth/storm:stable` image.
195194
DockerStable,
@@ -951,9 +950,10 @@ fn to_jani_main(
951950
if options.jani_dir.is_none() {
952951
if is_jani_command && options.run_storm.is_none() {
953952
return Err(VerifyError::UserError(
954-
"--jani-dir is required for the to-jani command.".into(),
953+
"Either --jani-dir or --run-storm must be provided.".into(),
955954
));
956-
} else {
955+
}
956+
if options.run_storm.is_some() {
957957
temp_dir = Some(tempfile::tempdir().map_err(|err| {
958958
VerifyError::UserError(
959959
format!("Could not create temporary directory: {}", err).into(),
@@ -962,6 +962,7 @@ fn to_jani_main(
962962
options.jani_dir = temp_dir.as_ref().map(|dir| dir.path().to_owned());
963963
}
964964
}
965+
965966
for source_unit in source_units {
966967
let source_unit = source_unit.enter();
967968
let jani_res = source_unit.write_to_jani_if_requested(&options, tcx);

0 commit comments

Comments
 (0)