Skip to content

Commit

Permalink
test run with admin
Browse files Browse the repository at this point in the history
  • Loading branch information
xiazhvera committed Feb 12, 2024
1 parent 4045d15 commit bb4b6b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/run_in_ci.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,14 @@ def make_windows_pfx_file(certificate_file_path, private_key_path, pfx_file_path
if os.path.isfile(copy_path[0] + ".key"):
os.remove(copy_path[0] + ".key")

test_ls_run = subprocess.run(args=["pwsh.exe", "-o Text", "-Command", "{\"ls\"}"], shell=True, capture_output=True, text=True)
test_ls_run = subprocess.run(args=["pwsh.exe", "-o Text", "-Command", "{\"ls\"}", "-RunAsAdmin"], shell=True, capture_output=True, text=True)
print("LS TEST out: " + str(test_ls_run.stdout))
print("LS TEST err: " + str(test_ls_run.stderr))


# 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 = ["pwsh.exe", "-Command", "{\"Import-PfxCertificate -FilePath " + pfx_file_path + " -CertStoreLocation Cert:\\" + pfx_certificate_store_location + " -Password $mypwd \"}"]
import_pfx_arguments = ["pwsh.exe", "-Command", "{\"Import-PfxCertificate -FilePath " + pfx_file_path + " -CertStoreLocation Cert:\\" + pfx_certificate_store_location + " -Password $mypwd \"}", "-RunAsAdmin"]
import_pfx_run = subprocess.run(args=import_pfx_arguments, shell=True, capture_output=True, text=True)
print("import out: " + str(import_pfx_run.stdout))
print("import err: " + str(import_pfx_run.stderr))
Expand Down

0 comments on commit bb4b6b4

Please sign in to comment.