Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

Commit

Permalink
fix: Fixed bug risks and antipatterns
Browse files Browse the repository at this point in the history
  • Loading branch information
profclems committed Aug 13, 2020
1 parent e8fb131 commit 84b4b68
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion commands/pipeline_ci_trace.go
Expand Up @@ -75,7 +75,7 @@ var pipelineCITraceCmd = &cobra.Command{
Message: "Select pipeline job to trace:",
Options: jobOptions,
}
survey.AskOne(prompt, &selectedJob)
_ = survey.AskOne(prompt, &selectedJob)
if selectedJob != "" {
re := regexp.MustCompile(`(?s)\((.*)\)`)
m := re.FindAllStringSubmatch(selectedJob,-1)
Expand Down
11 changes: 5 additions & 6 deletions commands/pipeline_status.go
Expand Up @@ -9,7 +9,6 @@ import (
"github.com/spf13/cobra"
"github.com/xanzy/go-gitlab"
"glab/internal/git"
"math"
"strconv"
"time"
)
Expand Down Expand Up @@ -73,12 +72,12 @@ var pipelineStatusCmd = &cobra.Command{
status = color.Gray.Sprint(s)
}
//fmt.Println(job.Tag)
fmt.Fprintf(writer, "(%s) • %s\t\t%s\t\t%s\n", status, duration, job.Stage, job.Name)
_, _ = fmt.Fprintf(writer, "(%s) • %s\t\t%s\t\t%s\n", status, duration, job.Stage, job.Name)
}

fmt.Fprintf(writer.Newline(), "\n%s\n", runningPipeline.WebURL)
fmt.Fprintf(writer.Newline(), "SHA: %s\n", runningPipeline.SHA)
fmt.Fprintf(writer.Newline(), "Pipeline State: %s\n", runningPipeline.Status)
_, _ = fmt.Fprintf(writer.Newline(), "\n%s\n", runningPipeline.WebURL)
_, _ = fmt.Fprintf(writer.Newline(), "SHA: %s\n", runningPipeline.SHA)
_, _ = fmt.Fprintf(writer.Newline(), "Pipeline State: %s\n", runningPipeline.Status)
if runningPipeline.Status == "running" && live {
pipes, err = getPipelines(l)
if err != nil {
Expand All @@ -92,7 +91,7 @@ var pipelineStatusCmd = &cobra.Command{
Options: []string{"View Logs", "Retry", "Exit"},
Default: "Exit",
}
survey.AskOne(prompt, &retry)
_ = survey.AskOne(prompt, &retry)
}
if retry != "" && retry != "Exit" {
if retry == "View Logs" {
Expand Down

0 comments on commit 84b4b68

Please sign in to comment.