Have crew_profile_base remove the path env.d file from install.sh, remove path line from install.sh (#9341)

This commit is contained in:
Satadru Pramanik, DO, MPH, MEng
2024-02-15 07:15:50 -05:00
committed by GitHub
parent ce8fbf738c
commit 7103e3f57d
3 changed files with 7 additions and 4 deletions

View File

@@ -280,9 +280,6 @@ echo_out "Set up and synchronize local package repo..."
echo "LD_LIBRARY_PATH=$CREW_PREFIX/lib${LIB_SUFFIX}:/lib${LIB_SUFFIX}" >> "$CREW_PREFIX"/etc/env.d/00-library
export LD_LIBRARY_PATH="${CREW_PREFIX}/lib${LIB_SUFFIX}:/lib${LIB_SUFFIX}"
# Add the CREW_PREFIX bin and musl bin directories to PATH.
echo -e "## Inserted by Chromebrew's install.sh\nPATH=$CREW_PREFIX/bin:$CREW_PREFIX/sbin:$CREW_PREFIX/share/musl/bin:\$PATH" > "$CREW_PREFIX"/etc/env.d/path
echo "export CREW_PREFIX=${CREW_PREFIX}" >> "${CREW_PREFIX}/etc/env.d/profile"
# Since we downloaded the package repo, just update package compatibility information.

View File

@@ -1,7 +1,7 @@
# lib/const.rb
# Defines common constants used in different parts of crew
CREW_VERSION = '1.43.5'
CREW_VERSION = '1.43.6'
# kernel architecture
KERN_ARCH = `uname -m`.chomp

View File

@@ -20,6 +20,12 @@ if @need_path
ExitMessage.add "Fixed path env.d file...\nPlease run 'source ~/.bashrc'".orange
end
# Remove install.sh provided path file since we supersede it.
if File.exist?("#{CREW_PREFIX}/etc/env.d/00-path")
puts "Removing #{CREW_PREFIX}/etc/env.d/path installed by the Chromebrew installer.\n".orange
FileUtils.rm "#{CREW_PREFIX}/etc/env.d/path"
end
# Check for renamed and deprecated packages, and handle them.
pkg_update_arr = [