Once my changes were made, I attempted to run ./avm pre-commit and received the following response in the console:
PS C:\Users\donovanmccoy\GIt\AVM\terraform-azurerm-avm-res-web-site> ./avm pre-commit
unknown shorthand flag: 'r' in -r
See 'docker run --help'.
Upon checking the changed files, I concluded that the 'r' in the -r ARM_SUBSCRIPTION_ID (line 21) may need to be changed to 'e'. This is the only occurance of an environment variable that follows the -r flag, as opposed to the -e flag.
I changed line 21 of avm.bat to see if this would allow docker to run the script.
current:
%CONTAINER_RUNTIME% run --pull always --rm -v "%cd%":/src -w /src --user "1000:1000" -r ARM_SUBSCRIPTION_ID -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER mcr.microsoft.com/azterraform make %1
potential fix:
%CONTAINER_RUNTIME% run --pull always --rm -v "%cd%":/src -w /src --user "1000:1000" -e ARM_SUBSCRIPTION_ID -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER mcr.microsoft.com/azterraform make %1
This change resulted in the script running successfully.
Check for previous/existing GitHub issues
Issue Type?
Bug
(Optional) Module Version
No response
(Optional) Correlation Id
No response
Description
After merging chore: repository governance to the AVM Terraform avm-res-web-site repository, I decided to work on a branch.
Once my changes were made, I attempted to run
./avm pre-commit
and received the following response in the console:Upon checking the changed files, I concluded that the 'r' in the
-r ARM_SUBSCRIPTION_ID
(line 21) may need to be changed to 'e'. This is the only occurance of an environment variable that follows the-r
flag, as opposed to the-e
flag.I changed line 21 of
avm.bat
to see if this would allow docker to run the script. current:potential fix:
This change resulted in the script running successfully.
Let me know what you all think 👍