[powershell] fix emsdk.ps1 assuming emsdk_set_env.ps1 lives in the current dir (#576)

This makes it fail when run from a project directory.
Thansks @sbc100 for finding the problem :)
This commit is contained in:
Wouter van Oortmerssen
2020-07-29 13:18:23 -07:00
committed by GitHub
parent 6dac5ae712
commit e3b08413c9

View File

@@ -31,9 +31,9 @@ $env:EMSDK_POWERSHELL = 1
# python is not able to set environment variables to the parent calling process, so
# therefore have it craft a .ps1 file, which we invoke after finishing python execution,
# to set up the environment variables
if (Test-Path ./emsdk_set_env.ps1) {
& ./emsdk_set_env.ps1
Remove-Item ./emsdk_set_env.ps1
if (Test-Path $ScriptDirectory/emsdk_set_env.ps1) {
& $ScriptDirectory/emsdk_set_env.ps1
Remove-Item $ScriptDirectory/emsdk_set_env.ps1
}
Remove-Item Env:\EMSDK_POWERSHELL