File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- // SPDX-FileCopyrightText: 2024-2026 Friedrich von Never <friedrich@fornever.me>
1+ // SPDX-FileCopyrightText: 2024-2026 TruePath contributors <friedrich@fornever.me>
22//
33// SPDX-License-Identifier: MIT
44
@@ -95,8 +95,8 @@ public void ReadKind_IsSymlink()
9595 {
9696 Directory . CreateSymbolicLink ( currentDirectory , tempDirectoryInfo ) ;
9797 }
98- catch ( IOException e ) when ( OperatingSystem . IsWindows ( ) ) // && !TestFramework .RunsOnCi())
99- { // TODO: Implement `TestFramework.RunsOnCi`
98+ catch ( IOException e ) when ( OperatingSystem . IsWindows ( ) && ! Utils . RunsOnCi ( ) )
99+ {
100100 if ( e . Message . Contains ( "privilege" ) && ( e . StackTrace ? . Contains ( "CreateSymbolicLink" ) ?? false ) )
101101 {
102102 Assert . Skip ( "Tests involving symlink creation require elevated privileges on Windows, as this is enforced at the OS level." ) ;
Original file line number Diff line number Diff line change 1- // SPDX-FileCopyrightText: 2024 TruePath contributors <https://github.com/ForNeVeR/TruePath>
1+ // SPDX-FileCopyrightText: 2024-2026 TruePath contributors <https://github.com/ForNeVeR/TruePath>
22//
33// SPDX-License-Identifier: MIT
44
@@ -22,4 +22,9 @@ internal static string ToNonCanonicalCase(this string path)
2222
2323 return nonCanonicalPath ;
2424 }
25+
26+ internal static bool RunsOnCi ( )
27+ {
28+ return Environment . GetEnvironmentVariable ( "CI" ) is not null ;
29+ }
2530}
You can’t perform that action at this time.
0 commit comments