Skip to content

Commit 6f160d3

Browse files
committed
revert: go back to .exe extension and LF-only for lock scripts
1 parent 72004e0 commit 6f160d3

2 files changed

Lines changed: 9 additions & 13 deletions

File tree

‎python/uv/private/lock.bat‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
if defined BUILD_WORKSPACE_DIRECTORY (
2-
set "out=%BUILD_WORKSPACE_DIRECTORY%\{{src_out}}"
3-
) else (
4-
exit /b 1
5-
)
6-
7-
"{{args}}" --output-file "%out%" %*
1+
if defined BUILD_WORKSPACE_DIRECTORY (
2+
set "out=%BUILD_WORKSPACE_DIRECTORY%\{{src_out}}"
3+
) else (
4+
exit /b 1
5+
)
6+
7+
"{{args}}" --output-file "%out%" %*

‎python/uv/private/lock.bzl‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,7 @@ def _lock_impl(ctx):
154154
lines.append('exec "$@"')
155155

156156
script = ctx.actions.declare_file(ctx.label.name + "_lock" + ext)
157-
if ctx.attr.is_windows:
158-
content = "\r\n".join(lines) + "\r\n"
159-
else:
160-
content = "\n".join(lines) + "\n"
161-
ctx.actions.write(output = script, content = content, is_executable = True)
157+
ctx.actions.write(output = script, content = "\n".join(lines) + "\n", is_executable = True)
162158

163159
srcs = srcs + ctx.files.build_constraints + ctx.files.constraints
164160

@@ -278,7 +274,7 @@ The string to input for the 'uv pip compile'.
278274
def _lock_run_impl(ctx):
279275
if ctx.attr.is_windows:
280276
path_sep = "\\"
281-
ext = ".bat"
277+
ext = ".exe"
282278
else:
283279
path_sep = "/"
284280
ext = ""

0 commit comments

Comments
 (0)