Skip to main content

platform_defaults

Function platform_defaults 

Source
pub fn platform_defaults(
    platform: RunnerPlatform,
    runtime: &Path,
    inherited: &Inherited,
    exists: impl Fn(&Path) -> bool,
) -> Vec<(&'static str, OsString)>
Expand description

The variables platform sets for a runner whose attempt directory is runtime, before runner.env is applied.

  • macOS: PATH with each of MACOS_TOOL_DIRECTORIES that exists (exists) and is not already listed put in front, when any is; LANG as MACOS_DEFAULT_LANG when the daemon has no locale.
  • Windows: USERPROFILE and HOME at <runtime>\home, and APPDATA and LOCALAPPDATA under it, as a logged-in profile lays them out. The directories are the caller’s to create. Per attempt rather than shared, so one job’s caches and configuration cannot reach the next job, and they go when the attempt’s directory goes. .NET’s known-folder APIs (Environment.GetFolderPath) ask Windows rather than these variables and still answer with the service account’s profile.
  • Linux: nothing.