From ef9b3f81267a9290cec66f9c1131fc13f77fd029 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Thu, 16 May 2024 14:38:59 +0200 Subject: [PATCH] Don't call `defaults` on Linux. --- lib/tasks/rust.rake | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/lib/tasks/rust.rake b/lib/tasks/rust.rake index 044491c..8e80af9 100644 --- a/lib/tasks/rust.rake +++ b/lib/tasks/rust.rake @@ -44,24 +44,26 @@ task :rust => [:'brew:casks_and_formulae', :sccache] do git-fetch-with-cli = true TOML - defaults 'com.macromates.TextMate' do - write 'environmentVariables', [ - { - 'enabled' => true, - 'name' => 'CARGO_HOME', - 'value' => '$HOME/.config/cargo', - }, - { - 'enabled' => true, - 'name' => 'PATH', - 'value' => '$CARGO_HOME/bin:$PATH', - }, - { - 'enabled' => true, - 'name' => 'RUSTUP_HOME', - 'value' => '$HOME/.config/rustup', - }, - ], add: true + if macos? + defaults 'com.macromates.TextMate' do + write 'environmentVariables', [ + { + 'enabled' => true, + 'name' => 'CARGO_HOME', + 'value' => '$HOME/.config/cargo', + }, + { + 'enabled' => true, + 'name' => 'PATH', + 'value' => '$CARGO_HOME/bin:$PATH', + }, + { + 'enabled' => true, + 'name' => 'RUSTUP_HOME', + 'value' => '$HOME/.config/rustup', + }, + ], add: true + end end if which 'rustup'