fix: emsdk swallows/overwrites parts of PATH (#642)
This PR has three changes: 1) Fixing --permanent flag: The previous algorithm looped over the values of PATH 4 times to check conditions while these conditions are the opposite of each other. Also, the result did not include all the parts in the whole_path. I have combined these loops and fixed the algorithm, so no path is lost. Now using --permanent the PATH and Env variables are correctly updated. 2) Fixing --system flag: Now, the system flag does not cause the PATH values to be overwritten/clobbered. The PATH/Env variables are correctly updated. 3) Fixing flagless flag: When no flag is provided the value of process/shell is correctly updated and preserved. This adds the tests for all the situations. Fixes #634 Fixes #645
This commit is contained in:
@@ -87,11 +87,46 @@ jobs:
|
||||
command: |
|
||||
source emsdk_env.sh
|
||||
python scripts/test.py
|
||||
|
||||
- run:
|
||||
name: flagless (process/shell) test
|
||||
shell: powershell.exe
|
||||
command: |
|
||||
scripts/test_activation.ps1
|
||||
|
||||
- run:
|
||||
name: --permanent test
|
||||
shell: powershell.exe
|
||||
command: |
|
||||
scripts/test_permanent.ps1
|
||||
$env:PERMANENT_FLAG="--permanent"
|
||||
scripts/test_activation.ps1
|
||||
|
||||
- run:
|
||||
name: --system test
|
||||
shell: powershell.exe
|
||||
command: |
|
||||
$env:SYSTEM_FLAG="--system"
|
||||
scripts/test_activation.ps1
|
||||
|
||||
- run:
|
||||
name: Process/Shell PATH preservation test
|
||||
shell: powershell.exe
|
||||
command: |
|
||||
scripts/test_path_preservation.ps1
|
||||
|
||||
- run:
|
||||
name: User PATH preservation test
|
||||
shell: powershell.exe
|
||||
command: |
|
||||
$env:PERMANENT_FLAG="--permanent"
|
||||
scripts/test_path_preservation.ps1
|
||||
|
||||
- run:
|
||||
name: System PATH preservation test
|
||||
shell: powershell.exe
|
||||
command: |
|
||||
$env:SYSTEM_FLAG="--system"
|
||||
scripts/test_path_preservation.ps1
|
||||
|
||||
build-docker-image:
|
||||
executor: bionic
|
||||
|
||||
Reference in New Issue
Block a user