Skip to content

Commit 81e3417

Browse files
feat: 'pavex' and 'pavexc' check a dedicated environment variable, in addition to invocation flags, to determine if diagnostic information should be outputted
1 parent 0e69876 commit 81e3417

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

libs/pavex_cli/src/command.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ pub enum Command {
110110
/// Optional.
111111
/// If provided, Pavex will serialize diagnostic information about
112112
/// the application to the specified path.
113-
#[clap(long, value_parser)]
113+
#[clap(long, env = "PAVEX_DIAGNOSTICS", value_parser)]
114114
diagnostics: Option<PathBuf>,
115115
#[clap(long)]
116116
/// Verify that the generated server SDK is up-to-date.

libs/pavexc_cli/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,14 +113,14 @@ enum Commands {
113113
blueprint: PathBuf,
114114
/// Optional. If provided, pavex will serialize diagnostic information about
115115
/// the application to the specified path.
116-
#[clap(long, value_parser)]
116+
#[clap(long, env = "PAVEXC_DIAGNOSTICS", value_parser)]
117117
diagnostics: Option<PathBuf>,
118118
/// The path to the directory that will contain the manifest and the source code for the generated application crate.
119119
/// If the provided path is relative, it is interpreted as relative to the root of the current workspace.
120120
#[clap(short, long, value_parser)]
121121
output: PathBuf,
122122
#[clap(long)]
123-
/// Verify that the generated server SDK is up-to-date.
123+
/// Verify that the generated server SDK is up-to-date.
124124
/// If it isn't, `pavexc` will return an error without updating
125125
/// the server SDK code.
126126
check: bool,

0 commit comments

Comments
 (0)