diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-10-12 19:04:20 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-10-12 19:07:40 +1100 |
commit | 031e97ef91654a53e7e534e7d4aa032e06eee319 (patch) | |
tree | ebd41bc2f974e84ab01dee70f2413b688c6e6371 /pkg/commands/tags.go | |
parent | 3df0a9f1322c5bb0e76967ee4b6ec3507ec41894 (diff) |
more password checks on commands that talk to the remote
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) } |