Skip to content

Commit 1bc2319

Browse files
committed
fix(bin): support adding profiles without needing an env file
1 parent 16180b3 commit 1bc2319

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

bin/tx3c/src/build.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ pub struct Args {
6969
action = clap::ArgAction::Append
7070
)]
7171
pub profile_env_files: Vec<ProfileKV<PathBuf>>,
72+
73+
/// Force inclusion of a profile in the TII output (even without env vars)
74+
#[arg(long = "profile", action = clap::ArgAction::Append)]
75+
pub profiles: Vec<String>,
7276
}
7377

7478
pub fn run(args: Args) -> anyhow::Result<()> {

bin/tx3c/src/tii/mod.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,10 @@ fn infer_available_profiles(args: &Args) -> HashSet<String> {
9595
profiles.insert(entry.profile.clone());
9696
}
9797

98-
// TODO: inspect other per-profile args in case there's other profiles
99-
// defined
98+
// Add profiles from --profile flag (forced inclusion)
99+
for profile in args.profiles.iter() {
100+
profiles.insert(profile.clone());
101+
}
100102

101103
profiles
102104
}

0 commit comments

Comments
 (0)