From 3a692c0b364fe72b79787932538734692bb2233d Mon Sep 17 00:00:00 2001 From: Daniel Marques Date: Sat, 6 Apr 2024 11:40:18 -0300 Subject: [PATCH] fix get bash version and variable name --- install.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/install.py b/install.py index 44cbe63..b14c17e 100755 --- a/install.py +++ b/install.py @@ -57,7 +57,7 @@ def verify_requirements(): print("Your SHELL %s is not supported" % get_shell(), file=sys.stderr) sys.exit(1) if get_shell() == "bash": - version_text = subprocess.Popen("bash --version | head -1", shell=True, stdout=subprocess.PIPE).stdout.read() + version_text = subprocess.Popen("bash --version | head -1", shell=True, stdout=subprocess.PIPE, text=True).stdout.read() m = re.search('(\d).(\d)', version_text) if m: major_version = int(m.group(1)) @@ -81,14 +81,14 @@ def main(): verify_requirements() print("---------------------------------------") config_dir_relative_path = '.local/share/marker' - config_dir_abosulte_path = os.path.join(os.path.expanduser("~"), config_dir_relative_path) + config_dir_absolute_path = os.path.join(os.path.expanduser("~"), config_dir_relative_path) install_dir = os.path.join(os.path.dirname(os.path.abspath(__file__))) - mkdir(config_dir_abosulte_path) + mkdir(config_dir_absolute_path) write_to_file( - os.path.join(config_dir_abosulte_path, 'marker.sh'), - generate_marker_sh(config_dir_abosulte_path, install_dir)) + os.path.join(config_dir_absolute_path, 'marker.sh'), + generate_marker_sh(config_dir_absolute_path, install_dir)) show_post_installation_message(config_dir_relative_path) print("---------------------------------------")