Skip to content

Commit 38e59c5

Browse files
committed
cli: Rename --json-fd to --progress-fd
The format is not as important as what the option *does*. There's multiple things that can be JSON, but this is specifically about dynamic progress information. Signed-off-by: Colin Walters <[email protected]>
1 parent 82ea2c5 commit 38e59c5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/src/cli.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ pub(crate) struct ProgressOptions {
3838
/// Interactive progress will be written to this file descriptor as "JSON lines"
3939
/// format, where each value is separated by a newline.
4040
#[clap(long)]
41-
pub(crate) json_fd: Option<RawProgressFd>,
41+
pub(crate) progress_fd: Option<RawProgressFd>,
4242
}
4343

4444
impl TryFrom<ProgressOptions> for ProgressWriter {
4545
type Error = anyhow::Error;
4646

4747
fn try_from(value: ProgressOptions) -> Result<Self> {
4848
let r = value
49-
.json_fd
49+
.progress_fd
5050
.map(TryInto::try_into)
5151
.transpose()?
5252
.unwrap_or_default();

tests/booted/test-image-pushpull-upgrade.nu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ RUN echo test content > /usr/share/blah.txt
6060
try { systemctl kill test-cat-progress }
6161
systemd-run -u test-cat-progress -- /bin/bash -c $"exec cat ($progress_fifo) > ($progress_json)"
6262
# nushell doesn't do fd passing right now either, so run via bash
63-
bash -c $"bootc switch --json-fd 3 --transport containers-storage localhost/bootc-derived 3>($progress_fifo)"
63+
bash -c $"bootc switch --progress-fd 3 --transport containers-storage localhost/bootc-derived 3>($progress_fifo)"
6464
# Now, let's do some checking of the progress json
6565
let progress = open --raw $progress_json | from json -o
6666
sanity_check_switch_progress_json $progress

0 commit comments

Comments
 (0)