devcontainers / devcontainers/ci
Incorrect parsing of environment variable when quoted
- Dominant language
- TypeScript
- Stars
- 496
- Forks
- 101
- PR merge metrics
- No merged PRs in 30d
Description
I was passing in a URL endpoint as an environment variable to a workflow step to run end-to-end test via Newman, and I was getting a protocol error through by Newman. After some investigation trying to access the same endpoint using wget I noticed that variable being passed in was being parsed incorrectly.
The problem arose when I was calling it like this:
```
- name: Run Tests
uses: devcontainers/ci@v0.2
with:
imageName: ghcr.io/microsoft/my-devcontainer
runCmd: make run-tests
imageTag: ${{ env.TAG }}
env: API_ENDPOINT="https://${{ env.APP_NAME }}.azurewebsites.net"
```
The solution was to remove the quotes around the variable like this:
```
- name: Run Tests
uses: devcontainers/ci@v0.2
with:
imageName: ghcr.io/microsoft/my-devcontainer
runCmd: make run-tests
imageTag: ${{ env.TAG }}
env: API_ENDPOINT=https://${{ env.APP_NAME }}.azurewebsites.net
```
But as a string I would expect it to be able to handle either format.
Contributor guide
Assessment
This issue has not been assessed yet.