Skip to main content

devshell_export_parent_dir

Function devshell_export_parent_dir 

Source
pub fn devshell_export_parent_dir() -> PathBuf
Expand description

Parent directory for per-run devshell_* export folders.

Many Linux systems mount std::env::temp_dir (often /tmp) with noexec, so cargo run can build but fails to execute target/debug/... with Permission denied (EACCES). This defaults to a user cache path that is normally executable.

Resolution order:

  1. DEVSHELL_EXPORT_BASE if set and non-empty.
  2. Unix: XDG_CACHE_HOME/cargo-devshell-exports, else HOME/.cache/cargo-devshell-exports.
  3. Windows: LOCALAPPDATA/cargo-devshell-exports.
  4. Fall back to std::env::temp_dir.