Had to change the way I've implemented the chdir in the install steps since it errors out

This commit is contained in:
Tristan Ancelet 2024-10-22 08:20:05 -05:00
parent b6226ad3cb
commit 713ea521c8

View File

@ -170,7 +170,7 @@ class Installer
file_contents = Net::HTTP.get(uri)
output_file = "discord-#{version}.tar.gz"
puts "download_installer: Output file will #{output_file}"
$CONFIG[:install_dir].chdir do
Dir.chdir($CONFIG[:install_dir]) do
File.open(output_file, 'wb') do |file|
file.write(file_contents)
end
@ -181,7 +181,7 @@ class Installer
def install
installer_file = "discord-#{self.remote_version}.tar.gz"
puts "do_install: Extracting new installer"
$CONFIG[:install_dir].chdir do
Dir.chdir($CONFIG[:install_dir]) do
File.open(installer_file, 'rb') do |file|
Gem::Package.new("").extract_tar_gz(file, $CONFIG[:install_dir])
end