mirror of
https://github.com/openai/codex.git
synced 2026-10-28 18:58:46 +00:00
package: include zsh fork in Codex package
Teach the Codex package builder to fetch the prebuilt zsh fork from a checked-in DotSlash manifest and install it under codex-resources/zsh/bin/zsh when an artifact is available for the package target. Generalize the DotSlash download/cache/verify helper previously embedded in ripgrep packaging so additional checked-in DotSlash manifests can use the same SHA-256 and size validation path. Add install-context support for locating the bundled zsh fork and thread that path through config loading as the lowest-precedence zsh_path default, preserving explicit CLI/profile/global config values. Also avoid preserving platform-specific file metadata when copying executables into the package directory so package smoke tests can use macOS system binaries as inputs.
This commit is contained in:
@@ -507,6 +507,7 @@ fn config_overrides_from_interactive(
|
||||
codex_self_exe: arg0_paths.codex_self_exe.clone(),
|
||||
codex_linux_sandbox_exe: arg0_paths.codex_linux_sandbox_exe.clone(),
|
||||
main_execve_wrapper_exe: arg0_paths.main_execve_wrapper_exe.clone(),
|
||||
default_zsh_path: crate::default_zsh_path(),
|
||||
show_raw_agent_reasoning: interactive.oss.then_some(true),
|
||||
additional_writable_roots: interactive.add_dir.clone(),
|
||||
..Default::default()
|
||||
|
||||
@@ -74,6 +74,7 @@ use codex_core::config::resolve_profile_v2_config_path;
|
||||
use codex_features::FEATURES;
|
||||
use codex_features::Stage;
|
||||
use codex_features::is_known_feature_key;
|
||||
use codex_install_context::InstallContext;
|
||||
use codex_login::AuthManager;
|
||||
use codex_login::CodexAuth;
|
||||
use codex_login::read_codex_access_token_from_env;
|
||||
@@ -1581,6 +1582,12 @@ async fn load_exec_server_config(
|
||||
.await?)
|
||||
}
|
||||
|
||||
pub(crate) fn default_zsh_path() -> Option<PathBuf> {
|
||||
InstallContext::current()
|
||||
.bundled_zsh_path()
|
||||
.map(AbsolutePathBuf::into_path_buf)
|
||||
}
|
||||
|
||||
async fn load_exec_server_remote_auth(
|
||||
config: &codex_core::config::Config,
|
||||
missing_auth_error: &'static str,
|
||||
@@ -1716,6 +1723,7 @@ async fn run_debug_prompt_input_command(
|
||||
codex_self_exe: arg0_paths.codex_self_exe,
|
||||
codex_linux_sandbox_exe: arg0_paths.codex_linux_sandbox_exe,
|
||||
main_execve_wrapper_exe: arg0_paths.main_execve_wrapper_exe,
|
||||
default_zsh_path: default_zsh_path(),
|
||||
show_raw_agent_reasoning: shared.oss.then_some(true),
|
||||
ephemeral: Some(true),
|
||||
bypass_hook_trust: shared.bypass_hook_trust.then_some(true),
|
||||
|
||||
Reference in New Issue
Block a user