Skip to content

Commit

Permalink
Merge pull request #46 from projectdiscovery/dev
Browse files Browse the repository at this point in the history
pdtm v0.0.3
  • Loading branch information
ehsandeep authored Jan 22, 2023
2 parents e4aa19d + 4f88dac commit ef9c86b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion internal/runner/banner.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/projectdiscovery/gologger"
)

const Version = "v0.0.2"
const Version = "v0.0.3"

var banner = fmt.Sprintf(`
____
Expand Down
10 changes: 5 additions & 5 deletions internal/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,9 @@ func installedVersion(i int, tool pkg.Tool) string {
if errors.As(err, &notFoundError) {
osAvailable := isOsAvailable(tool)
if osAvailable {
msg = au.Red("not installed").String()
msg = au.BrightYellow("(not installed)").String()
} else {
msg = au.BrightRed("not supported").String()
msg = au.Gray(10, "(not supported)").String()
}
} else {
msg = "version not found"
Expand All @@ -174,12 +174,12 @@ func installedVersion(i int, tool pkg.Tool) string {
if len(installedVersion) == 2 {
installedVersionString := strings.TrimPrefix(strings.TrimSpace(string(installedVersion[1])), "v")
if strings.Contains(tool.Version, installedVersionString) {
msg = au.Green("installed - latest").String()
msg = au.Green("(latest) (" + tool.Version + ")").String()
} else {
msg = au.Yellow("installed - outdated").String()
msg = au.Red("(outdated) ("+installedVersionString+")").String() + " ➡ " + au.Green("("+tool.Version+")").String()
}
}
fmt.Printf("%d. %s (%s)\n", i, tool.Name, msg)
fmt.Printf("%d. %s %s\n", i, tool.Name, msg)
return msg
}

Expand Down

0 comments on commit ef9c86b

Please sign in to comment.