Skip to content

Commit 03524db

Browse files
authored
Fix Platform.getFullExecutablePath for platforms with no file system (#1451)
1 parent 22d5467 commit 03524db

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Sources/FoundationEssentials/Platform.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,11 +365,13 @@ extension Platform {
365365
}
366366
return String(decodingCString: lpBuffer.baseAddress!, as: UTF16.self)
367367
}
368-
#else
368+
#elseif !NO_FILESYSTEM
369369
guard let processPath = CommandLine.arguments.first else {
370370
return nil
371371
}
372372
return processPath.lastPathComponent
373+
#else
374+
return nil
373375
#endif
374376
}
375377
}

0 commit comments

Comments
 (0)