{.deprecated: [existsFile: fileExists].} (#14735)
* {.deprecated: [existsFile: fileExists].}
* s/existsFile/fileExists/ except under deps
* workaround pending #14819
* fix test
This commit is contained in:
parent
366b9a7e4a
commit
dc5a40f3f3
31 changed files with 66 additions and 67 deletions
6
koch.nim
6
koch.nim
|
|
@ -113,7 +113,7 @@ proc tryExec(cmd: string): bool =
|
|||
result = execShellCmd(cmd) == 0
|
||||
|
||||
proc safeRemove(filename: string) =
|
||||
if existsFile(filename): removeFile(filename)
|
||||
if fileExists(filename): removeFile(filename)
|
||||
|
||||
proc overwriteFile(source, dest: string) =
|
||||
safeRemove(dest)
|
||||
|
|
@ -280,11 +280,11 @@ proc findStartNim: string =
|
|||
if ok: return nim
|
||||
when defined(Posix):
|
||||
const buildScript = "build.sh"
|
||||
if existsFile(buildScript):
|
||||
if fileExists(buildScript):
|
||||
if tryExec("./" & buildScript): return "bin" / nim
|
||||
else:
|
||||
const buildScript = "build.bat"
|
||||
if existsFile(buildScript):
|
||||
if fileExists(buildScript):
|
||||
if tryExec(buildScript): return "bin" / nim
|
||||
|
||||
echo("Found no nim compiler and every attempt to build one failed!")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue