소스 검색

clean up CurrentUser global cfg logic

pull/36/head
Rob Loranger 4 년 전
부모
커밋
024b7090ac
No known key found for this signature in database GPG 키 ID: D6F1633A4F0903B8
1개의 변경된 파일2개의 추가작업 그리고 3개의 파일을 삭제
  1. +2
    -3
      config/user.go

+ 2
- 3
config/user.go 파일 보기

@@ -159,11 +159,10 @@ func CurrentUser(c *cli.Context) (string, error) {
if err != nil {
return "", err
}
// only user global defaults when both are set and hosts match
// only use global defaults when both are set and no host flag
if globalCFG.Default.User != "" &&
globalCFG.Default.Host != "" &&
c.GlobalIsSet("host") &&
globalCFG.Default.Host == c.GlobalString("host") {
!c.GlobalIsSet("host") {
cfg = globalCFG
}
}


불러오는 중...
취소
저장