Skip to content

Commit 0fe2bb4

Browse files
committed
comment: if statement for command
1 parent fe224ae commit 0fe2bb4

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

python/uv/private/lock.bzl

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def _lock_impl(ctx):
136136
args.run_shell.add("--no-progress")
137137
args.run_shell.add("--quiet")
138138

139-
ctx.actions.run_shell(
139+
if ctx.files.existing_output:
140140
command = '{python} -c {python_cmd} && "$@"'.format(
141141
python = getattr(python, "path", python),
142142
python_cmd = shell.quote(
@@ -145,7 +145,12 @@ def _lock_impl(ctx):
145145
dst = output.path,
146146
),
147147
),
148-
) if ctx.files.existing_output else '"$@"',
148+
)
149+
else:
150+
command = '"$@"'
151+
152+
ctx.actions.run_shell(
153+
command = command,
149154
inputs = srcs + ctx.files.existing_output,
150155
mnemonic = "PyRequirementsLockUv",
151156
outputs = [output],

0 commit comments

Comments
 (0)