Skip to content
This repository was archived by the owner on Mar 30, 2025. It is now read-only.

Commit e37703c

Browse files
authored
Merge pull request #55 from staticdev/bug/nox-check
Fix nox check
2 parents 6348bce + ab3dc0d commit e37703c

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

tasks/main.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
register: pre_commit_folder_check
3535

3636
- name: Install pre-commit
37-
command: pipx install pre-commit
37+
command: "{{ ansible_env.HOME }}/.local/bin/pipx install pre-commit"
3838
register: output
3939
when: pre_commit_folder_check is failed
4040

@@ -44,7 +44,7 @@
4444
register: cookiecutter_folder_check
4545

4646
- name: Install cookiecutter
47-
command: pipx install cookiecutter
47+
command: "{{ ansible_env.HOME }}/.local/bin/pipx install cookiecutter"
4848
register: output
4949
when: cookiecutter_folder_check is failed
5050

@@ -68,17 +68,18 @@
6868
when: poetry_cmd is failed
6969

7070
- name: Check if nox is installed
71-
stat:
72-
path: "{{ ansible_env.HOME }}/.local/bin/nox"
73-
register: nox_folder_check
71+
command: "{{ ansible_env.HOME }}/.local/bin/nox --version"
72+
register: nox_version_cmd
73+
changed_when: false
74+
ignore_errors: true
7475

7576
- name: Install nox
76-
command: pipx install nox
77-
when: nox_folder_check is failed
77+
command: "{{ ansible_env.HOME }}/.local/bin/pipx install nox"
78+
when: nox_version_cmd is failed
7879

7980
- name: Install nox-poetry
80-
command: pipx inject nox nox-poetry
81-
when: nox_folder_check is failed
81+
command: "{{ ansible_env.HOME }}/.local/bin/pipx inject nox nox-poetry"
82+
when: nox_version_cmd is failed
8283

8384
- name: Install pycharm
8485
include_tasks: pycharm.yml

0 commit comments

Comments
 (0)