[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 :)
diff --git a/emsdk.ps1 b/emsdk.ps1
index ebd6f80..183a145 100644
--- a/emsdk.ps1
+++ b/emsdk.ps1
@@ -31,9 +31,9 @@
# 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