diff options
author | Jake Leahy <jake@leahy.dev> | 2023-12-02 15:29:10 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-02 05:29:10 +0100 |
commit | a25843cf8010db92de4e95e734e11208f36fea86 (patch) | |
tree | eba0396e0fb0ae51a4caa5cacca7949a95b106e4 /lib/std/private/jsutils.nim | |
parent | 0d24f765461785e5648ee580e0a4158eb344ee97 (diff) | |
download | Nim-a25843cf8010db92de4e95e734e11208f36fea86.tar.gz |
Show proper error message if trying to run a Nim file in a directory that doesn't exist (#23017)
For example with the command `nim r foo/bar.nim`, if `foo/` doesn't exist then it shows this message ``` oserrors.nim(92) raiseOSError Error: unhandled exception: No such file or directory Additional info: foo [OSError] ``` After PR it shows ``` Error: cannot open 'foo/bar.nim' ``` Which makes it line up with the error message if `foo/` did exist but `bar.nim` didn't. Does this by using the same logic for [handling if the file doesn't exist](https://github.com/ire4ever1190/Nim/blob/0dc12ec24b7902ef0023a9e694faa11bcf99e257/compiler/options.nim#L785-L788)
Diffstat (limited to 'lib/std/private/jsutils.nim')
0 files changed, 0 insertions, 0 deletions