mirror of
https://github.com/openai/codex.git
synced 2026-05-04 05:11:37 +03:00
adding support for reading execpolicy from /etc/codex and .codex of root git repo
This commit is contained in:
@@ -221,7 +221,9 @@ fn format_program_name(path: &Path, preserve_program_paths: bool) -> Option<Stri
|
||||
|
||||
async fn load_exec_policy() -> anyhow::Result<Policy> {
|
||||
let codex_home = find_codex_home().context("failed to resolve codex_home for execpolicy")?;
|
||||
codex_core::load_exec_policy(&codex_home)
|
||||
let cwd = std::env::current_dir().ok();
|
||||
|
||||
codex_core::load_exec_policy(&codex_home, cwd.as_deref())
|
||||
.await
|
||||
.map_err(anyhow::Error::from)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user