Start: Fix uv check
In Windows, checking for a command yields a FileNotFound error if the utility isn't found. This led to complicated logic which can be solved by using which instead. Signed-off-by: kingbri <8082010+kingbri1@users.noreply.github.com>
This commit is contained in:
parent
4036c70d75
commit
d7eb580e99
1 changed files with 3 additions and 7 deletions
10
start.py
10
start.py
|
|
@ -8,15 +8,11 @@ import platform
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
import traceback
|
import traceback
|
||||||
from shutil import copyfile
|
from shutil import copyfile, which
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
has_uv = (
|
# Checks for uv installation
|
||||||
subprocess.run(
|
has_uv = which("uv") is not None
|
||||||
["uv", "--version"], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL
|
|
||||||
).returncode
|
|
||||||
== 0
|
|
||||||
)
|
|
||||||
|
|
||||||
start_options = {}
|
start_options = {}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue