aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xur_upgrade.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/ur_upgrade.py b/ur_upgrade.py
index c4a9857..3b149fa 100755
--- a/ur_upgrade.py
+++ b/ur_upgrade.py
@@ -165,9 +165,15 @@ class Upgrade(object):
signal.signal(signal.SIGTERM, self._cleanup_on_signal)
if not which('rsync'):
+ self._cleanup()
print('++ rsync not found in PATH. Please install it.')
exit(1)
+ if self.ureka.path in os.path.abspath(os.path.curdir):
+ self._cleanup()
+ print("Impossible. Please change to a directory above {}.".format(self.ureka.path))
+ exit(1)
+
def run(self):
if not self.force:
if not ur_check_version(self.ureka, self.to_version):