Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pkg/commands/compute/language_go.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ func (g *Go) Build() error {
// The warning is to help a user know something isn't quite right and gives them
// the opportunity to do something about it if they choose.
func (g *Go) toolchainConstraint(toolchain, pattern, constraint string) {
if g.verbose {
text.Info(g.output, "The Fastly CLI requires a %s version '%s'. ", toolchain, constraint)
}

versionCommand := fmt.Sprintf("%s version", toolchain)
args := strings.Split(versionCommand, " ")

Expand Down Expand Up @@ -163,10 +167,6 @@ func (g *Go) toolchainConstraint(toolchain, pattern, constraint string) {
return
}

if g.verbose {
text.Info(g.output, "The Fastly CLI requires a %s version '%s'. ", toolchain, constraint)
}

if !c.Check(v) {
text.Warning(g.output, "The %s version '%s' didn't meet the constraint '%s'", toolchain, version, constraint)
text.Break(g.output)
Expand Down
8 changes: 4 additions & 4 deletions pkg/commands/compute/language_rust.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,10 @@ func (r *Rust) modifyCargoPackageName() error {
// The warning is to help a user know something isn't quite right and gives them
// the opportunity to do something about it if they choose.
func (r *Rust) toolchainConstraint() {
if r.verbose {
text.Info(r.output, "The Fastly CLI requires a Rust version '%s'. ", r.config.ToolchainConstraint)
}

versionCommand := "cargo version --quiet"
args := strings.Split(versionCommand, " ")

Expand Down Expand Up @@ -224,10 +228,6 @@ func (r *Rust) toolchainConstraint() {
return
}

if r.verbose {
text.Info(r.output, "The Fastly CLI requires a Rust version '%s'. ", r.config.ToolchainConstraint)
}

if !c.Check(v) {
text.Warning(r.output, "The Rust version '%s' didn't meet the constraint '%s'", version, r.config.ToolchainConstraint)
text.Break(r.output)
Expand Down