This commit is contained in:
Timothee Cour 2021-04-19 19:02:52 -07:00 • committed by GitHub
commit ad67bcf379
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 16 deletions

View file

@ -339,7 +339,7 @@ proc findMainFile(dir: string): string =
var nimFiles = 0
for kind, file in os.walkDir(dir):
if kind == pcFile:
if file.endsWith(cfgExt): return file[ .. ^(cfgExt.len+1)] & ".nim"
if file.endsWith(cfgExt): return file[0..^(cfgExt.len+1)] & ".nim"
elif file.endsWith(".nim"):
if result.len == 0: result = file
inc nimFiles