Skip to content

Commit 9e28fcb

Browse files
authored
Small fix to asset compilation retry (#45144)
Try num printed is now more human, and capture_output is added - it was missing in the original #45143
1 parent a8c4871 commit 9e28fcb

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

scripts/ci/pre_commit/compile_ui_assets.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,13 @@ def get_directory_hash(directory: Path, skip_path_regexp: str | None = None) ->
7171
env = os.environ.copy()
7272
env["FORCE_COLOR"] = "true"
7373
for try_num in range(3):
74-
print(f"### Trying to install yarn dependencies: attempt: {try_num} ###")
74+
print(f"### Trying to install yarn dependencies: attempt: {try_num + 1} ###")
7575
result = subprocess.run(
7676
["pnpm", "install", "--frozen-lockfile", "--config.confirmModulesPurge=false"],
7777
cwd=os.fspath(ui_directory),
7878
text=True,
7979
check=False,
80+
capture_output=True,
8081
)
8182
if result.returncode == 0:
8283
break

scripts/ci/pre_commit/compile_www_assets.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,13 @@ def get_directory_hash(directory: Path, skip_path_regexp: str | None = None) ->
7171
env = os.environ.copy()
7272
env["FORCE_COLOR"] = "true"
7373
for try_num in range(3):
74-
print(f"### Trying to install yarn dependencies: attempt: {try_num} ###")
74+
print(f"### Trying to install yarn dependencies: attempt: {try_num + 1} ###")
7575
result = subprocess.run(
76-
["yarn", "install", "--frozen-lockfile"], cwd=os.fspath(www_directory), text=True, check=False
76+
["yarn", "install", "--frozen-lockfile"],
77+
cwd=os.fspath(www_directory),
78+
text=True,
79+
check=False,
80+
capture_output=True,
7781
)
7882
if result.returncode == 0:
7983
break

0 commit comments

Comments
 (0)