diff --git a/norg/model/command_type.nim b/norg/model/command_type.nim index c44feb8..565562e 100644 --- a/norg/model/command_type.nim +++ b/norg/model/command_type.nim @@ -19,9 +19,18 @@ var RESTIC_BIN* = "restic" proc setBinaryLocations*(b: Binaries) = for borg in b.borg: - if fileExists(borg): BORG_BIN = borg + #echo "Checking if '", borg, "' exists" + if fileExists(borg): + #echo "Setting Borg binary to : ", borg + BORG_BIN = borg + break for restic in b.restic: - if fileExists(restic): RESTIC_BIN = restic + #echo "Checking if '", restic, "' exists" + if fileExists(restic): + #echo "Setting Restic binary to : ", restic + RESTIC_BIN = restic + break + proc toCommand*(str: string): Command = for cmd in Command.items: if str == $cmd: return cmd