diff options
Diffstat (limited to 'pkg/commands/tags.go')
-rw-r--r-- | pkg/commands/tags.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pkg/commands/tags.go b/pkg/commands/tags.go index f7b26d8df..121637311 100644 --- a/pkg/commands/tags.go +++ b/pkg/commands/tags.go @@ -1,5 +1,7 @@ package commands +import "fmt" + func (c *GitCommand) CreateLightweightTag(tagName string, commitSha string) error { return c.OSCommand.RunCommand("git tag %s %s", tagName, commitSha) } @@ -8,6 +10,7 @@ func (c *GitCommand) DeleteTag(tagName string) error { return c.OSCommand.RunCommand("git tag -d %s", tagName) } -func (c *GitCommand) PushTag(remoteName string, tagName string) error { - return c.OSCommand.RunCommand("git push %s %s", remoteName, tagName) +func (c *GitCommand) PushTag(remoteName string, tagName string, promptUserForCredential func(string) string) error { + command := fmt.Sprintf("git push %s %s", remoteName, tagName) + return c.OSCommand.DetectUnamePass(command, promptUserForCredential) } |