]> scripts.mit.edu Git - wizard.git/blobdiff - wizard/command/upgrade.py
Refactor interactive shell and add addenv support.
[wizard.git] / wizard / command / upgrade.py
index 0850994247275912d37487767d39553ec43a21c9..0001bc5b6c69707ee929b10f7603d6983893f97c 100644 (file)
@@ -350,13 +350,6 @@ class Upgrade(object):
             print "%d %s" % (conflicts, self.temp_wc_dir)
             raise MergeFailed
         else:
-            user_shell = os.getenv("SHELL")
-            if not user_shell: user_shell = "/bin/bash"
-            # XXX: scripts specific hack, since mbash doesn't respect the current working directory
-            # When the revolution comes (i.e. $ATHENA_HOMEDIR/Scripts is your Scripts home
-            # directory) this isn't strictly necessary, but we'll probably need to support
-            # web_scripts directories ad infinitum.
-            if user_shell == "/usr/local/bin/mbash": user_shell = "/bin/bash"
             while 1:
                 print
                 print "ERROR: The merge failed with %d conflicts in these files:" % conflicts
@@ -371,10 +364,7 @@ class Upgrade(object):
                 print "NOTE: If you resolve these conflicts, and then the upgrade fails for"
                 print "an unrelated reason, you can run 'wizard upgrade --continue' from this"
                 print "directory to try again."
-                try:
-                    shell.call(user_shell, "-i", interactive=True)
-                except shell.CallError as e:
-                    logging.warning("Shell returned non-zero exit code %d" % e.code)
+                shell.interactive()
                 if shell.eval("git", "ls-files", "--unmerged").strip():
                     print
                     print "WARNING: There are still unmerged files."