Skip to content

Commit

Permalink
cirrus run: rename --docker-no-pull to --container-no-pull
Browse files Browse the repository at this point in the history
  • Loading branch information
edigaryev committed Nov 9, 2020
1 parent e908393 commit a96d30e
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions internal/commands/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ var output string
var environment []string
var verbose bool

// Docker-related flags.
var dockerNoPull bool
// Container-related flags.
var containerNoPull bool

// Flags useful for debugging.
var debugNoCleanup bool
Expand Down Expand Up @@ -210,9 +210,9 @@ func run(cmd *cobra.Command, args []string) error {
executorOpts = append(executorOpts, executor.WithDirtyMode())
}

// Docker-related options
// Container-related options
executorOpts = append(executorOpts, executor.WithContainerOptions(options.ContainerOptions{
NoPull: dockerNoPull,
NoPull: containerNoPull,
NoCleanup: debugNoCleanup,
}))

Expand Down Expand Up @@ -251,10 +251,15 @@ func newRunCmd() *cobra.Command {
cmd.PersistentFlags().StringVarP(&output, "output", "o", logs.DefaultFormat(), fmt.Sprintf("output format of logs, "+
"supported values: %s", strings.Join(logs.Formats(), ", ")))

// Docker-related flags
cmd.PersistentFlags().BoolVar(&dockerNoPull, "docker-no-pull", false,
// Container-related flags
cmd.PersistentFlags().BoolVar(&containerNoPull, "container-no-pull", false,
"don't attempt to pull the images before starting containers")

// Deprecated flags
cmd.PersistentFlags().BoolVar(&containerNoPull, "docker-no-pull", false,
"don't attempt to pull the images before starting containers")
_ = cmd.PersistentFlags().MarkDeprecated("docker-no-pull", "use --container-no-pull instead")

// Flags useful for debugging
cmd.PersistentFlags().BoolVar(&debugNoCleanup, "debug-no-cleanup", false,
"don't remove containers and volumes after execution")
Expand Down

0 comments on commit a96d30e

Please sign in to comment.