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

SHELLSPEC_GROUP_ID: unbound variable #68

Closed
damienflament opened this issue May 25, 2020 · 5 comments
Closed

SHELLSPEC_GROUP_ID: unbound variable #68

damienflament opened this issue May 25, 2020 · 5 comments
Labels
bug Something isn't working

Comments

@damienflament
Copy link
Contributor

damienflament commented May 25, 2020

From Shellspec 0.24, my builds fail when running unit tests.

$ shellspec --no-banner spec/units

/home/travis/.local/lib/shellspec/lib/core/hook.sh: line 23: SHELLSPEC_GROUP_ID: unbound variable

Unexpected error (syntax error?) occurred in ''

Finished in 0.20 seconds (user 0.25 seconds, sys 0.02 seconds)
0 examples, 0 failures, aborted by an unexpected error

An unexpected error occurred. [executor: 1] [reporter: 1] [error handler: 102]
Fatal error occurred, terminated with exit status 1.

I ran a Travis build with Shellspec 0.23.0, 0.24.0, 0.24.1:
https://travis-ci.com/github/neimad/travis-python/builds/168011715

@damienflament
Copy link
Contributor Author

damienflament commented May 25, 2020

More info here.
It also occurs on my local machine.

It is related to some calls to Shellspec functions in my helper:

helper.sh

set -euo pipefail
IFS=$'\n\t'

shellspec_helper_configure() {
    shellspec_import 'support/doubles'
    shellspec_import 'support/fixtures'
    shellspec_import 'support/travis-python'

    shellspec_before 'setup_travis_python_directory'
    shellspec_after 'cleanup_travis_python_directory'
}

Removing calls to shellspec_before and shellspec_after prevents the error.

@ko1nksm
Copy link
Member

ko1nksm commented May 26, 2020

Hi,

Yes, it caused by shellspec_before and shellspec_after in spec_helper.sh.

Please note using shellspec_before and shellspec_after is undocumented. However, I think this usage is useful. I will fix it, and document it in the future.

@ko1nksm ko1nksm added bug Something isn't working WORKING Work in progress labels May 26, 2020
@ko1nksm
Copy link
Member

ko1nksm commented May 26, 2020

Fixed in 0.24.x and master branch. Would you please check if works?

@damienflament
Copy link
Contributor Author

Fixed in 0.24.x.

Another error occurs on the master branch (not the 0.24.x). But it does not seems related to this bug. My CI builds can run now !

Thanks !

@ko1nksm ko1nksm removed the WORKING Work in progress label May 27, 2020
@ko1nksm
Copy link
Member

ko1nksm commented May 27, 2020

Thank you for reporting. 0.24.2 has been released. And I also fixed another error on the master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants