⛩️ Powerful yet Minimal Nix Dependency Manager
flake flakes home-manager nixos go nix dependency dependencies

feat(yae): hide internal tool logs

fuwn.net f4b2680d c5eb4397

verified
+7 -11
+4 -4
source.go
··· 36 36 } 37 37 38 38 if source.Type == "git" { 39 - tag, err := source.fetchLatestGitTag(show) 39 + tag, err := source.fetchLatestGitTag() 40 40 41 41 if err != nil { 42 42 return updated, err ··· 65 65 } 66 66 } 67 67 68 - sha256, err := fetchSHA256(source.URL, source.Unpack, show) 68 + sha256, err := fetchSHA256(source.URL, source.Unpack) 69 69 70 70 if err != nil { 71 71 return updated, err ··· 85 85 return updated, nil 86 86 } 87 87 88 - func (source *Source) fetchLatestGitTag(show bool) (string, error) { 88 + func (source *Source) fetchLatestGitTag() (string, error) { 89 89 if source.Type == "git" { 90 90 repository := "https://github.com/" + strings.Split(source.URL, "/")[3] + "/" + strings.Split(source.URL, "/")[4] 91 - remotes, err := command("bash", show, "-c", fmt.Sprintf("git ls-remote %s | awk -F'/' '{print $NF}' | sort -V", repository)) 91 + remotes, err := command("bash", false, "-c", fmt.Sprintf("git ls-remote %s | awk -F'/' '{print $NF}' | sort -V", repository)) 92 92 93 93 if err != nil { 94 94 return "", err
+2 -2
utilities.go
··· 7 7 "strings" 8 8 ) 9 9 10 - func fetchSHA256(url string, unpack bool, show bool) (string, error) { 10 + func fetchSHA256(url string, unpack bool) (string, error) { 11 11 arguments := []string{"--type", "sha256", url} 12 12 13 13 if unpack { 14 14 arguments = append([]string{"--unpack"}, arguments...) 15 15 } 16 16 17 - output, err := command("nix-prefetch-url", show, arguments...) 17 + output, err := command("nix-prefetch-url", false, arguments...) 18 18 19 19 if err != nil { 20 20 return "", err
+1 -5
yae.go
··· 88 88 Name: "tag-predicate", 89 89 Usage: "Git tag predicate used in identifying latest git source", 90 90 }, 91 - &cli.BoolFlag{ 92 - Name: "silent", 93 - Usage: "Silence output", 94 - }, 95 91 &cli.StringFlag{ 96 92 Name: "trim-tag-prefix", 97 93 Usage: "A prefix to trim from remote git tags", ··· 151 147 source.Force = true 152 148 } 153 149 154 - if sha256, err := fetchSHA256(source.URL, c.Bool("unpack"), !c.Bool("silent")); err != nil { 150 + if sha256, err := fetchSHA256(source.URL, c.Bool("unpack")); err != nil { 155 151 return err 156 152 } else { 157 153 source.SHA256 = sha256