mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #27799 from terminalmage/issue27703
Fix usage of identity file in git.latest
This commit is contained in:
commit
5420006209
2 changed files with 4 additions and 1 deletions
|
@ -2486,7 +2486,7 @@ def remote_refs(url,
|
|||
except ValueError as exc:
|
||||
raise SaltInvocationError(exc.__str__())
|
||||
output = _git_run(command,
|
||||
user=user,
|
||||
runas=user,
|
||||
identity=identity,
|
||||
ignore_retcode=ignore_retcode)['stdout']
|
||||
ret = {}
|
||||
|
|
|
@ -592,6 +592,7 @@ def latest(name,
|
|||
base_rev = __salt__['git.rev_parse'](
|
||||
target,
|
||||
branch + '^{commit}',
|
||||
user=user,
|
||||
ignore_retcode=True)
|
||||
except CommandExecutionError as exc:
|
||||
return _fail(
|
||||
|
@ -640,6 +641,7 @@ def latest(name,
|
|||
local_copy = __salt__['git.rev_parse'](
|
||||
target,
|
||||
desired_upstream,
|
||||
user=user,
|
||||
ignore_retcode=True)
|
||||
except CommandExecutionError:
|
||||
pass
|
||||
|
@ -658,6 +660,7 @@ def latest(name,
|
|||
local_tag_sha1 = __salt__['git.rev_parse'](
|
||||
target,
|
||||
rev + '^{commit}',
|
||||
user=user,
|
||||
ignore_retcode=True)
|
||||
except CommandExecutionError:
|
||||
# Shouldn't happen if the tag exists
|
||||
|
|
Loading…
Add table
Reference in a new issue