Skip to content

Commit

Permalink
*: polish the trust key notice
Browse files Browse the repository at this point in the history
Signed-off-by: Wish <[email protected]>
  • Loading branch information
breezewish committed Nov 12, 2024
1 parent 505444d commit 62f8ca9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/localdata/profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,9 @@ func (p *Profile) ResetMirror(addr, root string) error {

// Only cache remote mirror
if strings.HasPrefix(addr, "http") && root != localRoot {
if strings.HasPrefix(root, "http") {
fmt.Printf("WARN: adding root certificate via internet: %s\n", root)
fmt.Printf("You can revoke this by remove %s\n", localRoot)
if strings.HasPrefix(root, "http") && !strings.HasPrefix(root, "https") {
fmt.Printf("WARN: Trusting component distribution key via insecure Internet: %s\n", root)
fmt.Printf(" To revoke TiUP's trust, remove this file: %s\n", localRoot)
}
_ = utils.Copy(p.Path("bin", "root.json"), localRoot)
}
Expand Down

0 comments on commit 62f8ca9

Please sign in to comment.