mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-09 15:37:56 -05:00
Adjust linter rule... (#8860)
* chdir before using git * fix rubocop complaint * adjust lint rule * expand logic of path env.d check * bump
This commit is contained in:
committed by
GitHub
parent
1cbe12f2a9
commit
2f578f414c
@@ -5,7 +5,14 @@
|
||||
FileUtils.rm_rf "#{HOME}/.cache/crewcache/manifest"
|
||||
|
||||
# Fix missing $PATH not added in install.sh
|
||||
if !system("grep -q '$PATH' #{CREW_PREFIX}/etc/env.d/path") || Gem::Version.new(CREW_VERSION.to_s) < Gem::Version.new('1.36.4')
|
||||
@need_path = false
|
||||
if !File.file?("#{CREW_PREFIX}/etc/env.d/path")
|
||||
@need_path = true
|
||||
elsif !system("grep -q '$PATH' #{CREW_PREFIX}/etc/env.d/path") || Gem::Version.new(CREW_VERSION.to_s) < Gem::Version.new('1.36.4')
|
||||
@need_path = true
|
||||
end
|
||||
if @need_path
|
||||
FileUtils.mkdir_p "#{CREW_PREFIX}/etc/env.d"
|
||||
File.write "#{CREW_PREFIX}/etc/env.d/path", <<~ENVD_PATH_EOF
|
||||
## Inserted by Chromebrew version #{CREW_VERSION}
|
||||
PATH=#{CREW_PREFIX}/bin:#{CREW_PREFIX}/sbin:#{CREW_PREFIX}/share/musl/bin:$PATH
|
||||
|
||||
Reference in New Issue
Block a user