mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[pycharm] PY-82799 Fix helper script to hide the metadata error
GitOrigin-RevId: 4678e6c19a6158508430e9a4375d65dd5868424b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
cea5100f10
commit
2b8885855c
@@ -21,7 +21,7 @@ venv_path = None
|
||||
try:
|
||||
sync_output = subprocess.check_output(
|
||||
[uv_path, "sync", "--script", script_path],
|
||||
stderr=subprocess.STDOUT
|
||||
stderr=subprocess.DEVNULL
|
||||
).decode("utf-8")
|
||||
|
||||
result = re.search(r"environment at: (.*)\n", sync_output)
|
||||
@@ -37,7 +37,6 @@ except subprocess.CalledProcessError as e:
|
||||
str_output = e.output.decode("utf-8")
|
||||
if "does not contain a PEP 723 metadata tag" in str_output:
|
||||
should_sync_project = True
|
||||
print(str_output, file=sys.stderr)
|
||||
|
||||
|
||||
sync_segment = "" if should_sync_project else "--no-sync"
|
||||
@@ -49,6 +48,5 @@ if venv_path is not None:
|
||||
command = [uv_path, "run", active_segment, sync_segment] + sys.argv[4:]
|
||||
command = [segment for segment in command if segment != ""]
|
||||
|
||||
print()
|
||||
print(" ".join([f"\"{segment}\"" if " " in segment else segment for segment in command]))
|
||||
subprocess.call(command)
|
||||
Reference in New Issue
Block a user