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

cmd/testscript: allow -e flag to pass env value #122

Merged
merged 1 commit into from Jan 19, 2021
Merged

Commits on Jan 19, 2021

  1. cmd/testscript: allow -e flag to pass env value

    The -e flag for testscript currently allows the caller to specify that
    environment variables are inherited from the current environment.
    
    However this falls when the current environment does not have a value
    set and you need to set a specific value. For example:
    
        GOBUILD=$(go env GOBUILD) testscript -e GOBUILD script.txt
    
    Instead, allow -e to also specify a value:
    
        testscript -e GOBUILD=$(go env GOBUILD) script.txt
    
    which feels more fluent/natural.
    myitcv committed Jan 19, 2021
    Copy the full SHA
    587957a View commit details
    Browse the repository at this point in the history