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:
PATHwith each ofMACOS_TOOL_DIRECTORIESthat exists (exists) and is not already listed put in front, when any is;LANGasMACOS_DEFAULT_LANGwhen the daemon has no locale. - Windows:
USERPROFILEandHOMEat<runtime>\home, andAPPDATAandLOCALAPPDATAunder 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. Most of .NET’s known-folder APIs (Environment.GetFolderPath) ask Windows rather than these variables and still answer with the service account’s profile. Local application data is the exception: measured on Windows 11, it followsUSERPROFILE, while roaming application data and the profile itself do not. - Linux: nothing of its own.
Then, on every platform, POWERSHELL_TELEMETRY_OPTOUT unless the daemon
sets it.