mirror of
https://github.com/actions/runner.git
synced 2026-01-02 07:41:00 +08:00
Runner cleanup - continuation (#209)
* Agent/AgentCredential -> Runner/RunnerCredential * Test trait rename: Agent -> Runner * Enable remaining RunnerL0 tests * Remove job message PII variable masking code * Remove unused Agent.ToolsDirectory variable * Misc test Agent -> Runner renaming * Some more misc cleaning
This commit is contained in:
@@ -190,25 +190,6 @@ namespace GitHub.Runner.Listener
|
||||
}
|
||||
}
|
||||
|
||||
#if !OS_WINDOWS
|
||||
// Fix the work folder setting on Linux
|
||||
if (settings.WorkFolder.Contains("vsts", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
var workFolder = "/runner/work";
|
||||
var unix = HostContext.GetService<IUnixUtil>();
|
||||
|
||||
// create new work folder /runner/work
|
||||
await unix.ExecAsync(HostContext.GetDirectory(WellKnownDirectory.Root), "sh", $"-c \"sudo mkdir -p {workFolder}\"");
|
||||
|
||||
// fix permission
|
||||
await unix.ExecAsync(HostContext.GetDirectory(WellKnownDirectory.Root), "sh", $"-c \"sudo chown -R $USER {workFolder}\"");
|
||||
|
||||
// update settings
|
||||
settings.WorkFolder = workFolder;
|
||||
store.SaveSettings(settings);
|
||||
}
|
||||
#endif
|
||||
|
||||
Trace.Info($"Set runner startup type - {startType}");
|
||||
HostContext.StartupType = startType;
|
||||
|
||||
Reference in New Issue
Block a user