Expand $PWD in config paths to the launch directory

This commit is contained in:
2026-11-17 20:37:01 +01:00
parent 34bc50a256
commit 352ead2bf5
6 changed files with 134 additions and 13 deletions
+4
View File
@@ -83,6 +83,10 @@ pub fn require_home() -> Result<String, SandboxError> {
.ok_or(SandboxError::HomeNotSet)
}
pub fn require_current_dir() -> Result<PathBuf, SandboxError> {
std::env::current_dir().map_err(SandboxError::CurrentDirUnavailable)
}
pub fn require_run_user() -> Result<String, SandboxError> {
std::env::var("XDG_RUNTIME_DIR")
.ok()