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

Error: undefined constant ENV #9687

Closed
n-rodriguez opened this issue Aug 20, 2020 · 3 comments
Closed

Error: undefined constant ENV #9687

n-rodriguez opened this issue Aug 20, 2020 · 3 comments

Comments

@n-rodriguez
Copy link

n-rodriguez commented Aug 20, 2020

Hi there!

I got this bug on GithubActions :

Run make spec
crystal spec
Showing last frame. Use --error-trace for full trace.

In /usr/share/crystal/src/time/location.cr:335:15

 335 | case tz = ENV["TZ"]?
                 ^
Error: undefined constant ENV
make: *** [spec] Error 1
Makefile:18: recipe for target 'spec' failed
##[error]Process completed with exit code 2.

I don't have this error on my machine :

nicolas@laptop:~/PROJECTS/CRYSTAL/stacker$ make spec
crystal spec
..................

Finished in 7.0 milliseconds
18 examples, 0 failures, 0 errors, 0 pending
ArchLinux

Crystal 0.35.1 [5999ae29b] (2020-06-19)

LLVM: 8.0.0
Default target: x86_64-unknown-linux-gnu

And the tests passed 1h before : https://github.com/jbox-web/stacker/runs/1009908500?check_suite_focus=true

n-rodriguez added a commit to jbox-web/stacker that referenced this issue Aug 21, 2020
@n-rodriguez
Copy link
Author

The culprit seems to be https://github.com/crystal-lang/crystal-env

I try a build without it and it pass : https://github.com/jbox-web/stacker/runs/1010236344?check_suite_focus=true

@n-rodriguez
Copy link
Author

@bcardiff
Copy link
Member

Oh! The shard crystal-env, when included as env (as it is expected) ends up hidding the std-lib env module 🤦 .

The shard should be renamed to avoid this issue 😞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants