From 3e632205f3df0daa57b2100753d67d45b035938b Mon Sep 17 00:00:00 2001 From: coderiaser Date: Mon, 17 Jun 2024 15:43:43 +0300 Subject: [PATCH] feature: loop: use has_failed (https://github.com/Ph0enixKM/Amber/blob/0.3.3-alpha/src/std/main.ab#L114) --- src/get-missing-dependency.ab | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/get-missing-dependency.ab b/src/get-missing-dependency.ab index 0db052f..f82d08c 100644 --- a/src/get-missing-dependency.ab +++ b/src/get-missing-dependency.ab @@ -1,3 +1,5 @@ +import {has_failed} from "std"; + let names = [ "fallocate", "mkfs.ext4", @@ -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; } }