Skip to content

Commit

Permalink
Fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
giginet committed Jan 29, 2024
1 parent a619e71 commit 3fb6fb0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Sources/ScipioKit/Runner.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ public struct Runner {
return try AbsolutePath(validating: fileURL.path)
} else if let currentDirectory = fileSystem.currentWorkingDirectory {
#if swift(>=5.10)
let tsc_currentDirectory = try ScipioAbsolutePath(validating: currentDirectory.pathString)
return try ScipioAbsolutePath(tsc_currentDirectory, validating: fileURL.path)
let scipioCurrentDirectory = try ScipioAbsolutePath(validating: currentDirectory.pathString)
return try ScipioAbsolutePath(scipioCurrentDirectory, validating: fileURL.path)
#else
return ScipioAbsolutePath(currentDirectory, fileURL.path)
#endif
Expand Down
5 changes: 4 additions & 1 deletion Sources/ScipioKit/TSCBasics+Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,15 @@ import Basics
// However we just provides utils to bridge them at this time
#if swift(>=5.10)

// Above Swift 5.10, SwiftPM requires their own AbsolutePath
// So we have to convert them to Scipio requires

typealias ScipioAbsolutePath = TSCBasic.AbsolutePath
typealias SwiftPMAbsolutePath = Basics.AbsolutePath

#else

// Below Swift 5.9, Basics.AbsolutePath is not implemented. So this is required to keep backward-compatibility
// Below Swift 5.9, Basics.AbsolutePath is not implemented yet. So this is required to keep backward-compatibility

typealias ScipioAbsolutePath = TSCBasic.AbsolutePath
typealias SwiftPMAbsolutePath = TSCBasic.AbsolutePath
Expand Down

0 comments on commit 3fb6fb0

Please sign in to comment.