Skip to content

Commit a80914e

Browse files
committed
fixup: expandTilde might raise unlisted KeyError
1 parent b9c9e90 commit a80914e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/std/private/osappdirs.nim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ when defined(unix): # XXX: suitable?
6767
if p.isNil:
6868
if nomem:
6969
raise newException(OutOfMemDefect, "")
70-
else:
71-
raise newException(KeyError,
72-
"getpwnam(): name not found: " & username.repr)
70+
#else: ...KeyError "getpwnam(): name not found: " & username.repr
71+
# XXX: do not raise KeyError, as it used to raise no CatchableError.
72+
# e.g. `osproc.findExe(data.sysCommand, true, ExeExts)` expects so
7373
else:
7474
result = ""
7575
if not getPwDir(p, result):

0 commit comments

Comments
 (0)