run git from proper directory
This commit is contained in:
@@ -55,10 +55,6 @@ def known_commit_or_tag(ref):
|
||||
|
||||
|
||||
def checkout(parser, args):
|
||||
deployment_required_args = {'remote': 'origin'}
|
||||
deployment.setup_deployment_args('checkout', args,
|
||||
deployment_required_args)
|
||||
|
||||
remote = args.remote or 'origin'
|
||||
url = args.url
|
||||
ref = args.ref
|
||||
@@ -66,6 +62,7 @@ def checkout(parser, args):
|
||||
global git # make git available to called methods
|
||||
git = which('git', required=True)
|
||||
|
||||
with working_dir(spack.paths.prefix):
|
||||
# Always fetch branches
|
||||
branches = map(lambda b: b.strip('* '),
|
||||
git('branch', output=str, error=str).split('\n'))
|
||||
|
||||
Reference in New Issue
Block a user