Skip to content

Commit e544583

Browse files
committed
Rename executable_path to executable_name throughout code and tests
1 parent 55d8dbd commit e544583

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

src/cli.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ pub fn cli() -> Result<RunResult, RunnerError> {
114114
codeowners_file_path,
115115
project_root,
116116
no_cache: args.no_cache,
117-
executable_path: None,
117+
executable_name: None,
118118
};
119119

120120
let runner_result = match args.command {

src/runner.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ where
4747
pub(crate) fn config_from_run_config(run_config: &RunConfig) -> Result<Config, Error> {
4848
match crate::config::Config::load_from_path(&run_config.config_path) {
4949
Ok(mut c) => {
50-
if let Some(executable_name) = &run_config.executable_path {
50+
if let Some(executable_name) = &run_config.executable_name {
5151
c.executable_name = executable_name.clone();
5252
}
5353
Ok(c)

src/runner/types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pub struct RunConfig {
1717
pub codeowners_file_path: PathBuf,
1818
pub config_path: PathBuf,
1919
pub no_cache: bool,
20-
pub executable_path: Option<String>,
20+
pub executable_name: Option<String>,
2121
}
2222

2323
#[derive(Debug, Serialize)]

tests/common/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ pub fn build_run_config(project_root: &Path, codeowners_rel_path: &str) -> RunCo
157157
codeowners_file_path,
158158
config_path,
159159
no_cache: true,
160-
executable_path: None,
160+
executable_name: None,
161161
}
162162
}
163163

tests/run_config_executable_override_test.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ fn test_run_config_executable_path_overrides_config_file() -> Result<(), Box<dyn
1818

1919
let mut run_config = build_run_config(project_path, ".github/CODEOWNERS");
2020
// Use a relative path that gets displayed as-is in error messages
21-
run_config.executable_path = Some("my-wrapper-tool".to_string());
21+
run_config.executable_name = Some("my-wrapper-tool".to_string());
2222

2323
let result = validate(&run_config, vec![]);
2424

@@ -50,7 +50,7 @@ fn test_run_config_without_executable_path_uses_config_file() -> Result<(), Box<
5050
// This fixture has executable_name: "bin/codeownership" in config
5151

5252
let mut run_config = build_run_config(project_path, ".github/CODEOWNERS");
53-
run_config.executable_path = None; // Explicitly no override
53+
run_config.executable_name = None; // Explicitly no override
5454

5555
let result = validate(&run_config, vec![]);
5656

@@ -78,7 +78,7 @@ fn test_run_config_executable_path_overrides_default() -> Result<(), Box<dyn Err
7878
// This fixture has NO executable_name in config (uses default "codeowners")
7979

8080
let mut run_config = build_run_config(project_path, ".github/CODEOWNERS");
81-
run_config.executable_path = Some("custom-command".to_string());
81+
run_config.executable_name = Some("custom-command".to_string());
8282

8383
let result = validate(&run_config, vec![]);
8484

tests/runner_api.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ team_file_glob:
3838
codeowners_file_path: temp_dir.path().join(".github/CODEOWNERS").to_path_buf(),
3939
config_path: temp_dir.path().join("config/code_ownership.yml").to_path_buf(),
4040
no_cache: true,
41-
executable_path: None,
41+
executable_name: None,
4242
};
4343

4444
let file_owner = runner::file_owner_for_file(&run_config, "app/consumers/deep/nesting/nestdir/deep_file.rb")
@@ -64,7 +64,7 @@ fn test_teams_for_files_from_codeowners() {
6464
codeowners_file_path: project_root.join(".github/CODEOWNERS").to_path_buf(),
6565
config_path: project_root.join("config/code_ownership.yml").to_path_buf(),
6666
no_cache: true,
67-
executable_path: None,
67+
executable_name: None,
6868
};
6969
let teams =
7070
runner::teams_for_files_from_codeowners(&run_config, &file_paths.iter().map(|s| s.to_string()).collect::<Vec<String>>()).unwrap();
@@ -131,7 +131,7 @@ javascript_package_paths:
131131
codeowners_file_path: td.path().join(".github/CODEOWNERS"),
132132
config_path: td.path().join("config/code_ownership.yml"),
133133
no_cache: true,
134-
executable_path: None,
134+
executable_name: None,
135135
};
136136

137137
// Ensure CODEOWNERS file matches generator output to avoid out-of-date errors
@@ -173,7 +173,7 @@ javascript_package_paths:
173173
codeowners_file_path: td.path().join(".github/CODEOWNERS"),
174174
config_path: td.path().join("config/code_ownership.yml"),
175175
no_cache: true,
176-
executable_path: None,
176+
executable_name: None,
177177
};
178178

179179
let gv = runner::generate_and_validate(&rc, vec![], true);

0 commit comments

Comments
 (0)