Skip to content

Commit

Permalink
keep changes from upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
karampok authored and saschagrunert committed Mar 14, 2024
1 parent 915ca84 commit 53b22d5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
9 changes: 4 additions & 5 deletions demo.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,18 @@ const (
// enabled.
FlagAutoTimeout = "auto-timeout"

// FlagBreakPoint is the flag for doing`auto` but with breakpoint
// FlagBreakPoint is the flag for doing`auto` but with breakpoint.
FlagBreakPoint = "with-breakpoints"

// FlagContinueOnError is the flag for steps continue running if
// there is an error
// there is an error.
FlagContinueOnError = "continue-on-error"

// FlagContinuously is the flag for running the demos continuously without
// any end.
FlagContinuously = "continuously"

// DryRun
// DryRun only prints the command in the stdout.
FlagDryRun = "dry-run"

// FlagHideDescriptions is the flag for hiding the descriptions.
Expand All @@ -53,7 +53,7 @@ const (
// FlagImmediate is the flag for disabling the text animations.
FlagImmediate = "immediate"

// NoColor true to print without colors, special characters
// NoColor true to print without colors, special characters for writing into file.
FlagNoColor = "no-color"

// FlagSkipSteps is the flag for skipping n amount of steps.
Expand All @@ -77,7 +77,6 @@ func New() *Demo {
&cli.BoolFlag{
Name: FlagAuto,
Aliases: []string{"a"},
Value: true,
Usage: "run the demo in automatic mode, " +
"where every step gets executed automatically",
},
Expand Down
8 changes: 4 additions & 4 deletions run.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,8 @@ func (s *step) echo(current, max int) {
prepared = append(
prepared,
p(
"# %s [%d/%d]:\n",
x, current, max,
"# %s [%d/%d]%s\n",
x, current, max, colon,
),
)
} else {
Expand All @@ -259,8 +259,8 @@ func (s *step) execute() error {
p = fmt.Sprintf
}

cmdString := p("%s", strings.Join(s.command, " \\\n "))
s.print("```\n" + cmdString + "\n```\n")
cmdString := p("> %s", strings.Join(s.command, " \\\n "))
s.print(cmdString)
if err := s.waitOrSleep(); err != nil {
return fmt.Errorf("unable to execute step: %v: %w", s, err)
}
Expand Down

0 comments on commit 53b22d5

Please sign in to comment.