corrective measure for windows compat

This commit is contained in:
Paul Wilde 2024-08-25 09:23:51 +01:00
parent 1ecdeb6a82
commit 0db7635412

View file

@ -19,9 +19,18 @@ var RESTIC_BIN* = "restic"
proc setBinaryLocations*(b: Binaries) = proc setBinaryLocations*(b: Binaries) =
for borg in b.borg: 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: 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 = proc toCommand*(str: string): Command =
for cmd in Command.items: for cmd in Command.items:
if str == $cmd: return cmd if str == $cmd: return cmd