Skip to content

Commit 54e6be4

Browse files
committed
fix: rename plain to ansi
1 parent 6a29557 commit 54e6be4

File tree

5 files changed

+14
-17
lines changed

5 files changed

+14
-17
lines changed

Sources/ContainerCommands/Container/ContainerRun.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ extension Application {
4444
@OptionGroup(title: "Registry options")
4545
var registryFlags: Flags.Registry
4646

47-
@Option(name: .long, help: ArgumentHelp("Progress type (format: none|plain)", valueName: "type"))
48-
var progress: String = "plain"
47+
@Option(name: .long, help: ArgumentHelp("Progress type (format: none|ansi)", valueName: "type"))
48+
var progress: String = "ansi"
4949

5050
@OptionGroup
5151
var global: Flags.Global
@@ -63,7 +63,7 @@ extension Application {
6363
var progressConfig: ProgressConfig
6464
switch self.progress {
6565
case "none": progressConfig = try ProgressConfig(disableProgressUpdates: true)
66-
case "plain":
66+
case "ansi":
6767
progressConfig = try ProgressConfig(
6868
showTasks: true,
6969
showItems: true,

Sources/ContainerCommands/Image/ImagePull.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ extension Application {
3434
@OptionGroup
3535
var registry: Flags.Registry
3636

37-
@Option(name: .long, help: ArgumentHelp("Progress type (format: none|plain)", valueName: "type"))
38-
var progress: String = "plain"
37+
@Option(name: .long, help: ArgumentHelp("Progress type (format: none|ansi)", valueName: "type"))
38+
var progress: String = "ansi"
3939

4040
@Option(
4141
name: .shortAndLong,
@@ -81,7 +81,7 @@ extension Application {
8181
var progressConfig: ProgressConfig
8282
switch self.progress {
8383
case "none": progressConfig = try ProgressConfig(disableProgressUpdates: true)
84-
case "plain":
84+
case "ansi":
8585
progressConfig = try ProgressConfig(
8686
showTasks: true,
8787
showItems: true,

Sources/ContainerCommands/Image/ImagePush.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ extension Application {
3131
@OptionGroup
3232
var registry: Flags.Registry
3333

34-
@Option(name: .long, help: ArgumentHelp("Progress type (format: none|plain)", valueName: "type"))
35-
var progress: String = "plain"
34+
@Option(name: .long, help: ArgumentHelp("Progress type (format: none|ansi)", valueName: "type"))
35+
var progress: String = "ansi"
3636

3737
@Option(
3838
name: [.customLong("arch"), .customShort("a")],
@@ -71,7 +71,7 @@ extension Application {
7171
var progressConfig: ProgressConfig
7272
switch self.progress {
7373
case "none": progressConfig = try ProgressConfig(disableProgressUpdates: true)
74-
case "plain":
74+
case "ansi":
7575
progressConfig = try ProgressConfig(
7676
description: "Pushing image \(image.reference)",
7777
itemsName: "blobs",

Tests/CLITests/Subcommands/Build/CLIRunBase.swift

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,8 @@ class TestCLIRunBase: CLITest {
115115
if Tty { arguments.append("-t") }
116116
}
117117

118-
if Progress == "none" {
119-
arguments.append("--progress none")
120-
} else {
121-
arguments.append("--progress plain")
122-
}
118+
arguments.append("--progress")
119+
arguments.append(Progress)
123120

124121
if let entrypoint = Entrypoint {
125122
arguments += ["--entrypoint", entrypoint]

docs/command-reference.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ container run [OPTIONS] IMAGE [COMMAND] [ARG...]
5555
* **Registry options**
5656
* `--scheme <scheme>`: Scheme to use when connecting to the container registry. One of (http, https, auto) (default: auto)
5757
* **Progress options**
58-
* `--progress <type>`: Progress type (format: none|plain) (default: plain)
58+
* `--progress <type>`: Progress type (format: none|ansi) (default: ansi)
5959
* **Global options**
6060
* `--debug`: Enable debug output [environment: CONTAINER_DEBUG]
6161
* `--version`: Show the version.
@@ -354,7 +354,7 @@ container image pull [OPTIONS] REFERENCE
354354

355355
* `--platform <platform>`: Platform string in the form `os/arch/variant`. Example `linux/arm64/v8`, `linux/amd64`. Default: current host platform.
356356
* `--scheme <scheme>`: Scheme to use when connecting to the container registry. One of (`http`, `https`, `auto`) (default: `auto`)
357-
* `--progress <type>`: Progress type (format: none|plain) (default: plain)
357+
* `--progress <type>`: Progress type (format: none|ansi) (default: ansi)
358358
* **Global**: `--debug`, `--version`, `-h`/`--help`
359359

360360
### `container image push`
@@ -371,7 +371,7 @@ container image push [OPTIONS] REFERENCE
371371

372372
* `--platform <platform>`: Platform string in the form `os/arch/variant`. Example `linux/arm64/v8`, `linux/amd64` (optional)
373373
* `--scheme <scheme>`: Scheme to use when connecting to the container registry. One of (`http`, `https`, `auto`) (default: `auto`)
374-
* `--progress <type>`: Progress type (format: none|plain) (default: plain)
374+
* `--progress <type>`: Progress type (format: none|ansi) (default: ansi)
375375
* **Global**: `--debug`, `--version`, `-h`/`--help`
376376

377377
### `container image save`

0 commit comments

Comments
 (0)