This commit is contained in:
Araq
2019-01-15 22:57:50 +01:00
parent 27e366eaec
commit ef769e20b3

View File

@@ -74,7 +74,8 @@ Web options:
build the official docs, use UA-48159761-1
"""
let kochExe* = os.getAppFilename()
let kochExe* = when isMainModule: os.getAppFilename() # always correct when koch is main program, even if `koch` exe renamed eg: `nim c -o:koch_debug koch.nim`
else: getAppDir() / "koch " # `best effort`, works for ur particular use case in nightly
proc kochExec*(cmd: string) =
exec kochExe.quoteShell & " " & cmd