@@ -300,11 +300,11 @@ public async Task<IDisposable> StartRunnerForOneJobAsync(int projectId)
300300 if ( ! File . Exists ( path ) )
301301 {
302302 Uri url ;
303- if ( RuntimeInformation . IsOSPlatform ( OSPlatform . Windows ) )
303+ if ( OperatingSystem . IsWindows ( ) )
304304 {
305305 url = new Uri ( $ "https://gitlab-runner-downloads.s3.amazonaws.com/v{ version } /binaries/gitlab-runner-windows-amd64.exe") ;
306306 }
307- else if ( RuntimeInformation . IsOSPlatform ( OSPlatform . Linux ) )
307+ else if ( OperatingSystem . IsLinux ( ) )
308308 {
309309 url = new Uri ( $ "https://gitlab-runner-downloads.s3.amazonaws.com/v{ version } /binaries/gitlab-runner-linux-amd64") ;
310310 }
@@ -335,7 +335,7 @@ public async Task<IDisposable> StartRunnerForOneJobAsync(int projectId)
335335 }
336336
337337 TestContext . WriteLine ( "Test runner downloaded" ) ;
338- if ( RuntimeInformation . IsOSPlatform ( OSPlatform . Linux ) )
338+ if ( OperatingSystem . IsLinux ( ) )
339339 {
340340 using var chmodProcess = Process . Start ( "chmod" , "+x \" " + path + "\" " ) ;
341341 chmodProcess . WaitForExit ( ) ;
@@ -379,7 +379,7 @@ public async Task<IDisposable> StartRunnerForOneJobAsync(int projectId)
379379 "run-single" ,
380380 "--url" , DockerContainer . GitLabUrl . ToString ( ) ,
381381 "--executor" , "shell" ,
382- "--shell" , RuntimeInformation . IsOSPlatform ( OSPlatform . Windows ) ? "powershell" : "pwsh" ,
382+ "--shell" , OperatingSystem . IsWindows ( ) ? "powershell" : "pwsh" ,
383383 "--builds-dir" , buildDir ,
384384 "--wait-timeout" , "240" , // in seconds
385385 "--token" , runner . Token ,
0 commit comments