From 1990b4df42d0e2a653b49c6ee50a7c27b1192b8c Mon Sep 17 00:00:00 2001 From: Dylan Donahue Date: Sat, 31 Aug 2024 19:01:05 -0400 Subject: [PATCH] windows fix --- ner_setup.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ner_setup.py b/ner_setup.py index 4539c9c..54bcf0a 100644 --- a/ner_setup.py +++ b/ner_setup.py @@ -95,9 +95,12 @@ def install_probe_rs(): print("Installing probe-rs...") try: if os_type == "Windows": - # For Windows, using PowerShell to execute the script - command = ["powershell", "-Command", "irm https://github.com/probe-rs/probe-rs/releases/latest/download/probe-rs-tools-installer.ps1 | iex"] - run_command(command, shell=False) + # Using CMD to run PowerShell for downloading and executing the script + command = [ + "cmd", "/c", + "powershell -Command \"Invoke-RestMethod https://github.com/probe-rs/probe-rs/releases/latest/download/probe-rs-tools-installer.ps1 | Invoke-Expression\"" + ] + run_command(command) else: # For Unix-like systems (Linux, macOS) command = ["bash", "-c", "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/probe-rs/probe-rs/releases/latest/download/probe-rs-tools-installer.sh | sh"]