-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
print only on analyze command (#288)
- Loading branch information
1 parent
dd26e70
commit 26129a2
Showing
2 changed files
with
9 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ package cmd | |
|
||
import ( | ||
"fmt" | ||
"github.com/fatih/color" | ||
"os" | ||
"strings" | ||
|
||
|
@@ -44,6 +45,14 @@ func newAnalyzeCommand() *cobra.Command { | |
Short: `Analyze GitHub/GitLab organizations associated with a PAT to find security issues`, | ||
RunE: executeAnalyzeCommand, | ||
SilenceUsage: true, | ||
PostRun: func(cmd *cobra.Command, args []string) { | ||
lineStart := color.New(color.FgMagenta, color.Bold).Sprintf("--->") | ||
legitify := color.New(color.FgMagenta, color.Bold).Sprintf("legitify") | ||
legitifyMail := color.New(color.FgMagenta, color.Bold).Sprintf("[email protected]") | ||
legitText := fmt.Sprintf("%s If you have any questions or you need assistance using %s,"+ | ||
" please don't hesitate REACHING OUT @ %s", lineStart, legitify, legitifyMail) | ||
screen.Printf("%s", legitText) | ||
}, | ||
} | ||
|
||
scorecardWhens := toOptionsString(scorecardOptions()) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,6 @@ import ( | |
"github.com/Legit-Labs/legitify/internal/outputer/scheme" | ||
"github.com/Legit-Labs/legitify/internal/outputer/scheme/converter" | ||
"github.com/Legit-Labs/legitify/internal/screen" | ||
"github.com/fatih/color" | ||
"github.com/spf13/pflag" | ||
"github.com/spf13/viper" | ||
) | ||
|
@@ -101,15 +100,6 @@ func (a *args) applyOutputOptions() (preExitHook func(), err error) { | |
buf.WriteString(fmt.Sprintf("Some policies skipped. Check %s for more details\n", permFile.Name())) | ||
} | ||
|
||
lineStart := color.New(color.FgMagenta, color.Bold).Sprintf("--->") | ||
legitify := color.New(color.FgMagenta, color.Bold).Sprintf("legitify") | ||
legitifyMail := color.New(color.FgMagenta, color.Bold).Sprintf("[email protected]") | ||
|
||
legitText := fmt.Sprintf("%s If you have any questions or you need assistance using %s,"+ | ||
" please don't hesitate REACHING OUT @ %s", lineStart, legitify, legitifyMail) | ||
|
||
buf.WriteString(legitText) | ||
|
||
if buf.Len() > 0 { | ||
screen.Printf("\n\n%s\n", buf.String()) | ||
} | ||
|