Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

static walkDir(checkDir=true) does not raise error #24521

Open
capocasa opened this issue Dec 6, 2024 · 0 comments
Open

static walkDir(checkDir=true) does not raise error #24521

capocasa opened this issue Dec 6, 2024 · 0 comments
Assignees
Labels

Comments

@capocasa
Copy link
Collaborator

capocasa commented Dec 6, 2024

Description

According to docs, calling walkDir with the parameter checkDir=true should raise an error if the directory doesn't exist.

This does not happen in a static block.

# foo.nim
static:
  walkDir("nonexistantdirectory), checkDir=true)

$ nim c foo
# compile successful, no error raised

Nim Version

Nim Compiler Version 2.2.0 [Linux: amd64]
Compiled at 2024-10-02
Copyright (c) 2006-2024 by Andreas Rumpf

git hash: 78983f1
active boot switches: -d:release

Current Output

No outputError: unhandled exception: No such file or directory
Additional info: this-should-not-exist [OSError]

Expected Output

Error: unhandled exception: No such file or directory
Additional info: nonexistantdirectory [OSError]

Known Workarounds

Check manually

Additional Information

No response

@capocasa capocasa self-assigned this Dec 6, 2024
@capocasa capocasa added the Easy label Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant