diff --git a/CHANGELOG.md b/CHANGELOG.md index a434c50..9c17067 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +## [1.8.9] - unreleased +### Added +### Changed +### Deprecated +### Removed +- Logging errors from security commands +### Fixed +### Security + ## [1.8.8] - 10/11/22 ### Added - Filename length limit on gitlab repos with name collisions diff --git a/cmd/version.go b/cmd/version.go index 8aa33ef..2013258 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -6,7 +6,7 @@ import ( "github.com/spf13/cobra" ) -const ghorgVersion = "v1.8.8" +const ghorgVersion = "v1.8.9" var versionCmd = &cobra.Command{ Use: "version", diff --git a/configs/configs.go b/configs/configs.go index 914a2f4..4c2957a 100644 --- a/configs/configs.go +++ b/configs/configs.go @@ -3,7 +3,6 @@ package configs import ( "errors" - "fmt" "log" "os" "os/exec" @@ -12,7 +11,6 @@ import ( "runtime" "strings" - "github.com/gabrie30/ghorg/colorlog" "github.com/gabrie30/ghorg/scm" "github.com/gabrie30/ghorg/utils" @@ -180,10 +178,7 @@ func getOrSetGitHubToken() { return } cmd := `security find-internet-password -s github.com | grep "acct" | awk -F\" '{ print $4 }'` - out, err := exec.Command("bash", "-c", cmd).Output() - if err != nil { - colorlog.PrintError(fmt.Sprintf("Failed to execute command: %s", cmd)) - } + out, _ := exec.Command("bash", "-c", cmd).Output() token = strings.TrimSuffix(string(out), "\n") @@ -205,10 +200,7 @@ func getOrSetGitLabToken() { return } cmd := `security find-internet-password -s gitlab.com | grep "acct" | awk -F\" '{ print $4 }'` - out, err := exec.Command("bash", "-c", cmd).Output() - if err != nil { - colorlog.PrintError(fmt.Sprintf("Failed to execute command: %s", cmd)) - } + out, _ := exec.Command("bash", "-c", cmd).Output() token = strings.TrimSuffix(string(out), "\n") @@ -223,10 +215,7 @@ func getOrSetBitBucketToken() { return } cmd := `security find-internet-password -s bitbucket.com | grep "acct" | awk -F\" '{ print $4 }'` - out, err := exec.Command("bash", "-c", cmd).Output() - if err != nil { - colorlog.PrintError(fmt.Sprintf("Failed to execute command: %s", cmd)) - } + out, _ := exec.Command("bash", "-c", cmd).Output() token = strings.TrimSuffix(string(out), "\n")