Skip to content

Commit

Permalink
Don't call defaults on Linux.
Browse files Browse the repository at this point in the history
  • Loading branch information
reitermarkus committed May 16, 2024
1 parent 3e9a37e commit b8efaa2
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions lib/tasks/sccache.rake
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# frozen_string_literal: true

require 'environment'
require 'macos'

task :sccache => [:'brew:casks_and_formulae'] do
puts ANSI.blue { 'Setting RUSTC_WRAPPER to `sccache` …' }
Expand All @@ -9,13 +10,15 @@ task :sccache => [:'brew:casks_and_formulae'] do

ENV['RUSTC_WRAPPER'] = 'sccache'

defaults 'com.macromates.TextMate' do
write 'environmentVariables', [
{
'enabled' => true,
'name' => 'RUSTC_WRAPPER',
'value' => ENV.fetch('RUSTC_WRAPPER'),
},
], add: true
if macos?
defaults 'com.macromates.TextMate' do
write 'environmentVariables', [
{
'enabled' => true,
'name' => 'RUSTC_WRAPPER',
'value' => ENV.fetch('RUSTC_WRAPPER'),
},
], add: true
end
end
end

0 comments on commit b8efaa2

Please sign in to comment.