From 190402dea057a8490cfb63781e6607d74b618d01 Mon Sep 17 00:00:00 2001 From: demotomohiro Date: Wed, 8 Jan 2020 00:10:18 +0900 Subject: [PATCH] Set checkError = false in compiler --- compiler/nimblecmd.nim | 4 ++-- compiler/packagehandling.nim | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/nimblecmd.nim b/compiler/nimblecmd.nim index c84a0f3c28a34..d2093dbd285bd 100644 --- a/compiler/nimblecmd.nim +++ b/compiler/nimblecmd.nim @@ -103,7 +103,7 @@ iterator chosen(packages: StringTableRef): string = proc addNimblePath(conf: ConfigRef; p: string, info: TLineInfo) = var path = p - let nimbleLinks = toSeq(walkPattern(p / "*.nimble-link")) + let nimbleLinks = toSeq(walkPattern(p / "*.nimble-link", checkError = false)) if nimbleLinks.len > 0: # If the user has more than one .nimble-link file then... we just ignore it. # Spec for these files is available in Nimble's readme: @@ -121,7 +121,7 @@ proc addPathRec(conf: ConfigRef; dir: string, info: TLineInfo) = var packages = newStringTable(modeStyleInsensitive) var pos = dir.len-1 if dir[pos] in {DirSep, AltSep}: inc(pos) - for k,p in os.walkDir(dir): + for k,p in os.walkDir(dir, checkError = false): if k == pcDir and p[pos] != '.': addPackage(conf, packages, p, info) for p in packages.chosen: diff --git a/compiler/packagehandling.nim b/compiler/packagehandling.nim index e807ae3774b11..5eccc94b35f4c 100644 --- a/compiler/packagehandling.nim +++ b/compiler/packagehandling.nim @@ -26,7 +26,7 @@ proc getPackageName*(conf: ConfigRef; path: string): string = #echo "from cache ", d, " |", packageCache[d], "|", path.splitFile.name return conf.packageCache[d] inc parents - for file in walkFiles(d / "*.nimble"): + for file in walkFiles(d / "*.nimble", checkError = false): result = file.splitFile.name break packageSearch # we also store if we didn't find anything: