From 8dea4ec07d32f631476783dbccc44a6820e5a23f Mon Sep 17 00:00:00 2001 From: Fabio Scotto di Santolo Date: Wed, 13 May 2026 21:37:59 +0200 Subject: [PATCH] Fix rustup-init failing on fresh systems MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ~/.cargo/env does not exist before rustup-init runs — sourcing it upfront caused the task to fail on clean installs. Switch to a plain command invocation without the premature source. Co-Authored-By: Claude Sonnet 4.6 --- ansible/roles/profile_desktop_common/tasks/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ansible/roles/profile_desktop_common/tasks/main.yml b/ansible/roles/profile_desktop_common/tasks/main.yml index a71f7be..fe2a7e9 100644 --- a/ansible/roles/profile_desktop_common/tasks/main.yml +++ b/ansible/roles/profile_desktop_common/tasks/main.yml @@ -472,9 +472,9 @@ path: "{{ user_home }}/.cargo/bin/rustc" register: rustup_initialized - - name: Run rustup-init with cargo env sourced - ansible.builtin.shell: - cmd: . ~/.cargo/env && rustup-init -y --no-modify-path + - name: Run rustup-init + ansible.builtin.command: + cmd: rustup-init -y --no-modify-path creates: "{{ user_home }}/.cargo/bin/rustc" become_user: "{{ username }}" environment: