mirror of
https://github.com/outbackdingo/ghorg.git
synced 2026-01-27 10:19:03 +00:00
Remove logging errors from security commands
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user