Skip to content

Commit

Permalink
rename "source" argument to "sources"
Browse files Browse the repository at this point in the history
  • Loading branch information
aneksteind committed Nov 13, 2023
1 parent 376d0ef commit 3814547
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions c2rust/src/bin/c2rust-transpile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,17 @@ struct Args {
debug_labels: bool,

/// Input compile_commands.json file or path to source files
#[clap(long, parse(from_os_str), required = false, conflicts_with = "source")]
#[clap(long, parse(from_os_str), required = false, conflicts_with = "sources")]
compile_commands: Option<PathBuf>,

/// Source files to process, only valid if compile_commands.json path is not provided.
#[clap(
long = "source",
long = "sources",
parse(from_os_str),
multiple_values = true,
required = false
)]
source: Vec<PathBuf>,
sources: Vec<PathBuf>,

/// How to handle violated invariants or invalid code
#[clap(long, value_enum, default_value_t = InvalidCodes::CompileError)]
Expand Down Expand Up @@ -238,7 +238,7 @@ fn main() {
let compile_commands = if let Some(compile_commands_path) = args.compile_commands {
compile_commands_path
} else {
c2rust_transpile::create_temp_compile_commands(&args.source)
c2rust_transpile::create_temp_compile_commands(&args.sources)
};

let extra_args = args
Expand All @@ -250,7 +250,7 @@ fn main() {
c2rust_transpile::transpile(tcfg, &compile_commands, &extra_args);

// Remove the temporary compile_commands.json if it was created
if !args.source.is_empty() {
if !args.sources.is_empty() {
std::fs::remove_file(&compile_commands)
.expect("Failed to remove temporary compile_commands.json");
}
Expand Down

0 comments on commit 3814547

Please sign in to comment.