Add exitmessages (#8851)

* Add exitmessages

* bump version

* Use ExitMessage.new in fixup.rb

* Use ExitMessage.new in sommelier.rb

* use color for message

* style adjustment

* change to @supechicken suggested code

* bump version back
This commit is contained in:
Satadru Pramanik, DO, MPH, MEng
2023-10-30 13:19:19 -04:00
committed by GitHub
parent 121656b1bb
commit a87dcb305d
4 changed files with 26 additions and 13 deletions

View File

@@ -6,12 +6,11 @@ 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')
puts 'Fixing path env.d file...'.orange
puts "Please run 'source ~/.bashrc'".lightblue
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
ENVD_PATH_EOF
ExitMessage.add "Fixed path env.d file...\nPlease run 'source ~/.bashrc'".orange
end
# Check for renamed and deprecated packages, and handle them.