Skip to content

Commit

Permalink
validate --skip and --exclude paths
Browse files Browse the repository at this point in the history
Signed-off-by: onur-ozkan <work@onurozkan.dev>
  • Loading branch information
onur-ozkan committed Dec 12, 2024
1 parent ae3703c commit d52c5a6
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/bootstrap/src/core/config/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1314,7 +1314,20 @@ impl Config {

// Set flags.
config.paths = std::mem::take(&mut flags.paths);
config.skip = flags.skip.into_iter().chain(flags.exclude).collect();
config.skip = flags
.skip
.into_iter()
.chain(flags.exclude)
.map(|p| {
config
.src
.join(&p)
.canonicalize()
.map_err(|e| format!("path::canonicalize failed on '{}', {e}", p.display()))
.unwrap()
})
.collect();

config.include_default_paths = flags.include_default_paths;
config.rustc_error_format = flags.rustc_error_format;
config.json_output = flags.json_output;
Expand Down

0 comments on commit d52c5a6

Please sign in to comment.