Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cab4df8

Browse filesBrowse files
committed
Use jq's IN() instead of index()
The end result is the same, but the construction is more ergonomic.
1 parent ed7351e commit cab4df8
Copy full SHA for cab4df8

1 file changed

+3-3Lines changed: 3 additions & 3 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎Dockerfile-linux.template‎

Copy file name to clipboardExpand all lines: Dockerfile-linux.template
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ FROM buildpack-deps:{{ env.variant }}
1919
# ensure local python is preferred over distribution python
2020
ENV PATH /usr/local/bin:$PATH
2121

22-
{{ if [ "3.9", "3.10", "3.11", "3.12" ] | index(rcVersion) then ( -}}
22+
{{ if rcVersion | IN("3.9", "3.10", "3.11", "3.12") then ( -}}
2323
{{ # only set LANG on versions less than 3.13 -}}
2424
# cannot remove LANG even though https://bugs.python.org/issue19846 is fixed
2525
# last attempted removal of LANG broke many users:
@@ -174,7 +174,7 @@ RUN set -eux; \
174174
{{
175175
# skip optimizations on alpine on riscv64 (except python 3.9)
176176
# only 3.9 completes building on riscv64 with optimizations, 3.10-3.13 all hit the 3 hour limit
177-
if (is_alpine | not) or ( [ "3.9" ] | index(rcVersion) ) then (
177+
if (is_alpine | not) or rcVersion == "3.9" then (
178178
-}}
179179
--enable-optimizations \
180180
{{ ) else ( -}}
@@ -184,7 +184,7 @@ RUN set -eux; \
184184
--enable-shared \
185185
{{
186186
# <3.10 does not have -fno-semantic-interposition enabled and --with-lto does nothing for performance
187-
if [ "3.9" ] | index(rcVersion) then "" else (
187+
if rcVersion == "3.9" then "" else (
188188
-}}
189189
--with-lto \
190190
{{ ) end -}}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.