Nvm 0.39.3 => 0.40.1 (#10895)

This commit is contained in:
Ed Reel
2024-12-06 06:09:20 -06:00
committed by GitHub
parent e66cbdd361
commit 3fd7b5a4dc
3 changed files with 6 additions and 20 deletions

View File

@@ -0,0 +1 @@
/usr/local/etc/bash.d/10-nvm.sh

View File

@@ -0,0 +1 @@
/usr/local/etc/bash.d/10-nvm.sh

View File

@@ -3,9 +3,10 @@ require 'package'
class Nvm < Package
description 'Node Version Manager - Simple bash script to manage multiple active node.js versions.'
homepage 'https://github.com/nvm-sh/nvm'
version '0.39.3'
version '0.40.1'
license 'MIT'
compatibility 'all'
compatibility 'x86_64 aarch64 armv7l'
min_glibc '2.28'
source_url 'https://github.com/nvm-sh/nvm.git'
git_hashtag "v#{version}"
@@ -23,24 +24,7 @@ class Nvm < Package
FileUtils.rm_rf "#{CREW_DEST_PREFIX}/share/nvm/test"
end
def self.postinstall
if Gem::Version.new(LIBC_VERSION.to_s) < Gem::Version.new('2.28')
puts "\nNode.js 18.x and above requires GLIBC 2.28.".orange
puts "ChromeOS is currently running GLIBC #{LIBC_VERSION}.".orange
end
end
def self.postremove
config_dir = "#{CREW_PREFIX}/share/nvm"
if Dir.exist? config_dir
print "Would you like to remove the #{config_dir} directory? [y/N] "
case $stdin.gets.chomp.downcase
when 'y', 'yes'
FileUtils.rm_rf config_dir
puts "#{config_dir} removed.".lightblue
else
puts "#{config_dir} saved.".lightgreen
end
end
Package.agree_to_remove("#{CREW_PREFIX}/share/nvm")
end
end