From 713ea521c8157319f224a849036a5e252c1a2a31 Mon Sep 17 00:00:00 2001 From: Tristan Ancelet Date: Tue, 22 Oct 2024 08:20:05 -0500 Subject: [PATCH] Had to change the way I've implemented the chdir in the install steps since it errors out --- install-discord-linux.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install-discord-linux.rb b/install-discord-linux.rb index dda266d..cf6b749 100755 --- a/install-discord-linux.rb +++ b/install-discord-linux.rb @@ -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