From 639465202597eeade7b6f8ed232ae5e56f4559c0 Mon Sep 17 00:00:00 2001 From: yuvipanda Date: Tue, 31 Jul 2018 13:23:43 -0700 Subject: [PATCH] Fix ensure_symlinks to use method that actually exists --- tljh/installer.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tljh/installer.py b/tljh/installer.py index c8a99c3..cb86f62 100644 --- a/tljh/installer.py +++ b/tljh/installer.py @@ -287,7 +287,9 @@ def ensure_symlinks(prefix): """ tljh_config_src = os.path.join(prefix, 'bin', 'tljh-config') tljh_config_dest = '/usr/local/bin/tljh-config' - if not os.is_symlink(tljh_config_dest): + if not os.path.exists(tljh_config_dest): + # If this exists, we leave it alone. Do *not* remove it, + # since we are running as root and it could be anything! os.symlink(tljh_config_src, tljh_config_dest)