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

Variables: Pester Variable in BeforeAll scope not visible in variable list (but is watchable) #1687

Open
JustinGrote opened this issue Jan 28, 2022 · 1 comment
Labels

Comments

@JustinGrote
Copy link
Collaborator

JustinGrote commented Jan 28, 2022

image

To be clear it's not in local/script/global either. I would expect it to be in local. This is probably an issue in how we fetch variables from the various stacks, or maybe Pester exposes this variable in a weird way.

@ghost ghost added the Needs: Triage Maintainer attention needed! label Jan 28, 2022
@StevenBucher98 StevenBucher98 added Area-Pester Issue-Bug A bug to squash. Area-Debugging and removed Needs: Triage Maintainer attention needed! Area-Pester labels Feb 1, 2022
@fflaten
Copy link
Contributor

fflaten commented Aug 5, 2022

BeforeAll is just invoked a couple of scopes above. Nothing special. You can repro the problem using:

& {
    $newVar = 123
    'visible here'
    & {
        'not here'
    }
}

If you place the variable in the root it works, but not when it's defined in a inner scope.

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

3 participants