Skip to content

Commit

Permalink
fix: don't search in cache dir for compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
squattingmonk committed Jun 22, 2022
1 parent 94df06a commit e68faaa
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/nasher/compile.nim
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ proc compile*(opts: Options, target: Target, updatedNss: var seq[string]): bool
if opts.get("noCompile", false):
return cmd != "compile"

let
compiler = opts.findBin("nssCompiler", "nwnsc", "script compiler")
userFlags = opts.get("nssFlags", "-lowqey").parseCmdLine

withDir(cacheDir):
# If we are only compiling one file...
var scripts: seq[string]
Expand Down Expand Up @@ -167,7 +171,7 @@ proc compile*(opts: Options, target: Target, updatedNss: var seq[string]): bool
files.add(file)
if file.executable:
executables.add(file)

if file notin updatedNss:
let compiled = file.changeFileExt("ncs")
if not fileExists(compiled) or file.fileNewer(compiled):
Expand All @@ -176,10 +180,6 @@ proc compile*(opts: Options, target: Target, updatedNss: var seq[string]): bool

scripts = getUpdated(updatedNss, files)

let
compiler = opts.findBin("nssCompiler", "nwnsc", "script compiler")
userFlags = opts.get("nssFlags", "-lowqey").parseCmdLine

if scripts.len > 0:
let
chunkSize = opts.get("nssChunks", 500)
Expand Down

0 comments on commit e68faaa

Please sign in to comment.