Skip to content

Commit

Permalink
Merge pull request #1602 from golemfactory/div0-v0.8
Browse files Browse the repository at this point in the history
preset create protected against empty exe-unit list
  • Loading branch information
mfranciszkiewicz authored Oct 5, 2021
2 parents e174e52 + ea36712 commit 004f8a3
Show file tree
Hide file tree
Showing 3 changed files with 157 additions and 157 deletions.
4 changes: 4 additions & 0 deletions agent/provider/src/cli/preset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ impl PresetUpdater {
.position(|exeunit| exeunit == &self.preset.exeunit_name)
.unwrap_or(0);

if self.exeunits.is_empty() {
bail!("ExeUnits list empty");
}

let exeunit_idx = Select::new()
.with_prompt("ExeUnit")
.items(&self.exeunits[..])
Expand Down
Loading

0 comments on commit 004f8a3

Please sign in to comment.