Skip to content

Commit

Permalink
add pass path to config
Browse files Browse the repository at this point in the history
  • Loading branch information
dvogt23 committed Apr 27, 2018
1 parent b98da36 commit fa01ff5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions jiracli/cli.go
Expand Up @@ -34,6 +34,7 @@ type GlobalOptions struct {
Login figtree.StringOption `yaml:"login,omitempty" json:"login,omitempty"`
PasswordSource figtree.StringOption `yaml:"password-source,omitempty" json:"password-source,omitempty"`
PasswordDirectory figtree.StringOption `yaml:"password-directory,omitempty" json:"password-directory,omitempty"`
PasswordPath figtree.StringOption `yaml:"password-path,omitempty" json:"password-path,omitempty"`
Quiet figtree.BoolOption `yaml:"quiet,omitempty" json:"quiet,omitempty"`
SocksProxy figtree.StringOption `yaml:"socksproxy,omitempty" json:"socksproxy,omitempty"`
UnixProxy figtree.StringOption `yaml:"unixproxy,omitempty" json:"unixproxy,omitempty"`
Expand Down
3 changes: 3 additions & 0 deletions jiracli/password.go
Expand Up @@ -25,6 +25,9 @@ func (o *GlobalOptions) keyName() string {
}

if o.PasswordSource.Value == "pass" {
if o.PasswordPath.Value != "" {
return fmt.Sprintf("%s/%s", o.PasswordPath, user)
}
return fmt.Sprintf("GoJira/%s", user)
}
return user
Expand Down

0 comments on commit fa01ff5

Please sign in to comment.