From b6e8bd41bb45bc6d19b3fbde6618f648faced2a0 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Mon, 17 Nov 2014 17:44:59 +0000 Subject: omnibus: Simplify 'bundler exec' call There's no need for quite so many subshells. --- baserockimport/app.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/baserockimport/app.py b/baserockimport/app.py index c7f0e05..6ae3424 100644 --- a/baserockimport/app.py +++ b/baserockimport/app.py @@ -131,10 +131,8 @@ class BaserockImportApplication(cliapp.Application): # directory. That messes up any relative paths the user may have # passed on the commandline, so we do a bit of a hack to change # back to the original directory inside the `bundle exec` process. - subshell_command = "(cd %s; exec python %s)" % \ - (pipes.quote(directory), ' '.join(map(pipes.quote, args))) - shell_command = "sh -c %s" % pipes.quote(subshell_command) - return shell_command + return "cd %s; exec python %s" % ( + pipes.quote(directory), ' '.join(map(pipes.quote, args))) def reexecute_self_with_bundler(path): script = sys.argv[0] -- cgit v1.2.1