Skip to content

Commit

Permalink
feature: loop: use has_failed (https://github.com/Ph0enixKM/Amber/blo…
Browse files Browse the repository at this point in the history
  • Loading branch information
coderaiser committed Jun 17, 2024
1 parent ffb8b4b commit 3e63220
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/get-missing-dependency.ab
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import {has_failed} from "std";

let names = [
"fallocate",
"mkfs.ext4",
Expand All @@ -7,7 +9,7 @@ let names = [

pub fun get_missing_dependency() {
loop name in names {
if unsafe $command -v {name} == ""$ {
if has_failed(name) {
return name;
}
}
Expand Down

0 comments on commit 3e63220

Please sign in to comment.