-
Notifications
You must be signed in to change notification settings - Fork 278
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
I'm using a script to gather the current user principal to send it to the bicep template like this:
- uses: script
name: set environment variables
with:
run: $AZURE_PRINCIPAL_ID=(az ad signed-in-user show --query id -o tsv);
echo "::set-teamsfx-env
AZURE_PRINCIPAL_ID=${AZURE_PRINCIPAL_ID}"When I run it I can see in the output the correct ID:
* Executing task: $AZURE_PRINCIPAL_ID=(az ad signed-in-user show --query id -o tsv); echo $AZURE_PRINCIPAL_ID; echo "::set-teamsfx-env AZURE_PRINCIPAL_ID=${AZURE_PRINCIPAL_ID}"
::set-teamsfx-env
AZURE_PRINCIPAL_ID=ee******-****-****-****-********46e9
* Terminal will be reused by tasks, press any key to close it. But then, in the .env.dev file, the unexpanded value is stored:
AZURE_PRINCIPAL_ID=${AZURE_PRINCIPAL_ID}To Reproduce
Steps to reproduce the behavior:
- Write a script
- Store a value inside a script variable (ex:
$VAR="value") - Use echo "::set-teamsfx-env ..." to write the variable to the environment
- See the unexpanded variable in the .env.dev file
Expected behavior
Write expanded value into the .env file
VS Code Extension Information (please complete the following information):
- OS: Windows
- Version 6.4.2
CLI Information (please complete the following information):
- OS: Windows
- Version [e.g. 22]
Additional context
Script is running on powershell
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working