mirror of
https://github.com/openai/codex.git
synced 2026-10-20 17:38:45 +00:00
Fix Windows sandbox setup helper materialization
This commit is contained in:
@@ -22,18 +22,21 @@ pub(crate) const RESOURCES_DIRNAME: &str = "codex-resources";
|
||||
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
|
||||
pub(crate) enum HelperExecutable {
|
||||
CommandRunner,
|
||||
Setup,
|
||||
}
|
||||
|
||||
impl HelperExecutable {
|
||||
fn file_name(self) -> &'static str {
|
||||
match self {
|
||||
Self::CommandRunner => "codex-command-runner.exe",
|
||||
Self::Setup => "codex-windows-sandbox-setup.exe",
|
||||
}
|
||||
}
|
||||
|
||||
fn label(self) -> &'static str {
|
||||
match self {
|
||||
Self::CommandRunner => "command-runner",
|
||||
Self::Setup => "setup-helper",
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -559,4 +562,11 @@ mod tests {
|
||||
|
||||
assert_eq!(file_name, "codex-command-runner-test-suffix.exe");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn setup_helper_materialized_file_name_adds_suffix_before_extension() {
|
||||
let file_name = materialized_file_name(HelperExecutable::Setup, "test-suffix");
|
||||
|
||||
assert_eq!(file_name, "codex-windows-sandbox-setup-test-suffix.exe");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user