From 0db7635412fccead5e0da4c837d5d23645d83089 Mon Sep 17 00:00:00 2001 From: Paul Wilde Date: Sun, 25 Aug 2024 09:23:51 +0100 Subject: [PATCH] corrective measure for windows compat --- norg/model/command_type.nim | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) 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