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

Sign up
Appearance settings

Commit 753d0bb

Browse files
committed
Refactor poetry:install task
Separating the complex version determination code from the installation command makes it easier to understand the task code.
1 parent 515175f commit 753d0bb

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

‎Taskfile.yml‎

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -451,15 +451,18 @@ tasks:
451451
task utility:normalize-path \
452452
RAW_PATH="$(which python)" \
453453
)"
454+
455+
poetry_constraint="$( \
456+
yq \
457+
--input-format toml \
458+
--output-format yaml \
459+
'.tool.poetry.group.pipx.dependencies.poetry' \
460+
<pyproject.toml
461+
)"
462+
454463
pipx install \
455464
--force \
456-
"poetry==$( \
457-
yq \
458-
--input-format toml \
459-
--output-format yaml \
460-
'.tool.poetry.group.pipx.dependencies.poetry' \
461-
< pyproject.toml
462-
)"
465+
"poetry==$poetry_constraint"
463466
464467
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/poetry-task/Taskfile.yml
465468
poetry:install-deps:

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /