Skip to content

Commit f7fa6a5

Browse files
committed
1 parent 134867a commit f7fa6a5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Sources/StencilSwiftKit/Filters+Strings.swift

+3
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,10 @@ extension Filters.Strings {
305305
/// - Throws: FilterError.invalidInputType if the value parameter isn't a string
306306
static func dirname(_ value: Any?) throws -> Any? {
307307
let string = try Filters.parseString(from: value)
308+
308309
#if os(Linux)
310+
// `NSString.standardizingPath` crashes on Linux. Bug reference:
311+
// https://github.com/apple/swift-corelibs-foundation/pull/1536
309312
var result = NSString(string: string).deletingLastPathComponent
310313
if result.isEmpty {
311314
result = "."

0 commit comments

Comments
 (0)