Skip to content

Commit

Permalink
Fix powershell7.4 issue (#274)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiazhvera committed Feb 13, 2024
1 parent e1fcc05 commit 6b2ea37
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 2 additions & 3 deletions builder/actions/setup_cross_ci_crt_environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@
environment variables, secrets, files, etc. that is used to build up the testing environment.
"""

# TODO: The variable is used to disable the windows certificate store test to unblock a CI failure.
# The variable should be set to TRUE after the CI is fixed.
ENABLE_WINDOWS_CERT_STORE_TEST = False
# Enable windows certificate store test
ENABLE_WINDOWS_CERT_STORE_TEST = True


class SetupCrossCICrtEnvironment(Action):
Expand Down
4 changes: 4 additions & 0 deletions builder/actions/setup_cross_ci_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ def create_windows_cert_store(env, certificate_env, location_env):
# Import the PFX into the Windows Certificate Store
# (Passing '$mypwd' is required even though it is empty and our certificate has no password. It fails CI otherwise)
import_pfx_arguments = [
# Powershell 7.3 introduced an issue where launching powershell from cmd would not set PSModulePath correctly.
# As a workaround, we set `PSModulePath` to empty so powershell would automatically reset the PSModulePath to default.
# More details: https://github.com/PowerShell/PowerShell/issues/18530
"$env:PSModulePath = '';",
"Import-PfxCertificate",
"-FilePath", pfx_cert_path,
"-CertStoreLocation", windows_certificate_folder]
Expand Down

0 comments on commit 6b2ea37

Please sign in to comment.