Skip to content

Commit 6b2ea37

Browse files
authored
Fix powershell7.4 issue (#274)
1 parent e1fcc05 commit 6b2ea37

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

builder/actions/setup_cross_ci_crt_environment.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@
1414
environment variables, secrets, files, etc. that is used to build up the testing environment.
1515
"""
1616

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

2120

2221
class SetupCrossCICrtEnvironment(Action):

builder/actions/setup_cross_ci_helpers.py

+4
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ def create_windows_cert_store(env, certificate_env, location_env):
2323
# Import the PFX into the Windows Certificate Store
2424
# (Passing '$mypwd' is required even though it is empty and our certificate has no password. It fails CI otherwise)
2525
import_pfx_arguments = [
26+
# Powershell 7.3 introduced an issue where launching powershell from cmd would not set PSModulePath correctly.
27+
# As a workaround, we set `PSModulePath` to empty so powershell would automatically reset the PSModulePath to default.
28+
# More details: https://github.com/PowerShell/PowerShell/issues/18530
29+
"$env:PSModulePath = '';",
2630
"Import-PfxCertificate",
2731
"-FilePath", pfx_cert_path,
2832
"-CertStoreLocation", windows_certificate_folder]

0 commit comments

Comments
 (0)