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

nim check allows gorgeEx but doesn't allow writeFile #12491

Closed
genotrance opened this issue Oct 22, 2019 · 1 comment
Closed

nim check allows gorgeEx but doesn't allow writeFile #12491

genotrance opened this issue Oct 22, 2019 · 1 comment

Comments

@genotrance
Copy link
Contributor

Nim 1.0 onwards disabled dangerous actions in nim check. However, it is unclear what should and should not work. I couldn't find an issue/PR or commit related to the topic so opening this.

This works with nim check.

static:
  echo gorgeEx("sleep 5")

This does not work with nim check.

static:
  writeFile("/tmp/abc.txt", "ABC")
  doAssert fileExists("/tmp/abc.txt")

Context for this issue is this nimterop issue.

@Araq
Copy link
Member

Araq commented Oct 23, 2019

This is a showstopper bug for 1.0.4, neither nimsuggest nor nim check should run staticExec nor writeFile.

@Araq Araq closed this as completed in 8a599fb Oct 24, 2019
narimiran pushed a commit that referenced this issue Oct 30, 2019
(cherry picked from commit 8a599fb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants