Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion codex-rs/linux-sandbox/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ fn main() {
println!("cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS");
println!("cargo:rerun-if-env-changed=PKG_CONFIG_PATH");
println!("cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR");
println!("cargo:rerun-if-env-changed=CODEX_SKIP_VENDORED_BWRAP");

// Rebuild if the vendored bwrap sources change.
let manifest_dir = PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap_or_default());
Expand All @@ -31,7 +32,7 @@ fn main() {
);

let target_os = env::var("CARGO_CFG_TARGET_OS").unwrap_or_default();
if target_os != "linux" {
if target_os != "linux" || env::var_os("CODEX_SKIP_VENDORED_BWRAP").is_some() {
return;
Comment on lines +35 to 36
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Handle missing system bwrap when skip flag is enabled

Returning early when CODEX_SKIP_VENDORED_BWRAP is set skips vendored_bwrap_available, but runtime launcher logic still falls back to Vendored when no system bwrap exists. In that configuration, exec_vendored_bwrap panics instead of degrading cleanly. This makes the new build flag produce binaries that crash on Linux hosts without system bubblewrap.

Useful? React with 👍 / 👎.

}

Expand Down
Loading