Change whoami command from required to optional (#60)

This commit is contained in:
Mehran Poursadeghi
2022-05-03 21:20:19 +04:30
committed by GitHub
parent 827c3d9712
commit cb8d56a12e
5 changed files with 13 additions and 4 deletions
+4 -1
View File
@@ -26,6 +26,7 @@ type (
Username string
Password string
Token string
SkipWhoami bool
Email string
Registry string
Folder string
@@ -219,7 +220,9 @@ func (p *Plugin) authenticate() error {
}
// Write whoami command to verify credentials
cmds = append(cmds, whoamiCommand())
if !p.settings.SkipWhoami {
cmds = append(cmds, whoamiCommand())
}
// Run commands
err := runCommands(cmds, p.settings.Folder)