parse_env_file discard utf8 bom (#2638)

* parse_env_file discard utf8 bom

* powershell 5 may add the BOM even when explicitly using utf8

* add test + apply to GITHUB_PATH as well

* fix it

* fix powershel 5 syntax

* misc

* fixup

* fix wrong subaction

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
ChristopherHX
2025-02-01 19:17:25 +01:00
committed by GitHub
parent be1b6ee581
commit be51601734
7 changed files with 110 additions and 1 deletions

View File

@@ -6,7 +6,7 @@ jobs:
steps:
- run: |
echo $env:GITHUB_ENV
echo "key=val" > $env:GITHUB_ENV
echo "key=val" >> $env:GITHUB_ENV
echo "key2<<EOF" >> $env:GITHUB_ENV
echo "line1" >> $env:GITHUB_ENV
echo "line2" >> $env:GITHUB_ENV
@@ -24,7 +24,9 @@ jobs:
}
- run: |
echo $env:GITHUB_ENV
# Defect missing append
echo "KEY=test" > $env:GITHUB_ENV
# Defect missing append, test is broken!!!
echo "Key=expected" > $env:GITHUB_ENV
- name: Assert GITHUB_ENV is merged case insensitive
run: exit 1