Skip to content

Commit

Permalink
Fix default path.
Browse files Browse the repository at this point in the history
  • Loading branch information
reitermarkus committed May 16, 2024
1 parent 07d6f1c commit 528eb40
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ module Rake
default_path = Dir.glob('/etc/paths{,.d/*}')
.flat_map { |f| File.read(f).strip.split("\n") }

if File.exist?('/etc/environment')
default_path += File.read('/etc/environment')[/PATH=(?:"([^"]+)"|'([^']+)')/, 1]&.split(File::PATH_SEPARATOR) || []

Check failure on line 22 in Rakefile

View workflow job for this annotation

GitHub Actions / rubocop

[Layout/LineLength] Line is too long. [125/120]
end

if default_path.empty?
default_path = ['/usr/local/bin', '/usr/local/sbin', '/usr/bin', '/usr/sbin', '/bin', '/sbin']
end
Expand Down

0 comments on commit 528eb40

Please sign in to comment.