@@ -302,7 +302,7 @@ func processSwiftLibraries(_ binary: String) throws {
302302
303303 var args = [
304304 " --copy " , " --platform " , " macosx " ,
305- " --scan-executable " , binary, " --destination " , libPath ( binary) ,
305+ " --scan-executable " , binary, " --destination " , libPath ( binary)
306306 ]
307307
308308 if FileManager . default. fileExists ( atPath: swiftLibPath) {
@@ -332,19 +332,17 @@ func processVulkanLoader(
332332 pathJoin ( " /usr/local/share " , loaderRelativeFolder) ,
333333 pathJoin ( " /usr/share " , loaderRelativeFolder) ,
334334 pathJoin ( homebrewPrefix, pathJoin ( " etc " , loaderRelativeFolder) ) ,
335- pathJoin ( homebrewPrefix, pathJoin ( " share " , loaderRelativeFolder) ) ,
335+ pathJoin ( homebrewPrefix, pathJoin ( " share " , loaderRelativeFolder) )
336336 ]
337337
338338 var loaderSystemFolder = " "
339339 var loaderSystemPath = " "
340- for folder in loaderSystemSearchFolders {
341- if FileManager . default. fileExists ( atPath: folder) {
342- loaderSystemFolder = folder
343- let candidate = pathJoin ( folder, loaderName)
344- if FileManager . default. fileExists ( atPath: candidate) {
345- loaderSystemPath = candidate
346- break
347- }
340+ for folder in loaderSystemSearchFolders where FileManager . default. fileExists ( atPath: folder) {
341+ loaderSystemFolder = folder
342+ let candidate = pathJoin ( folder, loaderName)
343+ if FileManager . default. fileExists ( atPath: candidate) {
344+ loaderSystemPath = candidate
345+ break
348346 }
349347 }
350348
@@ -517,9 +515,9 @@ func bundleVersion(_ buildPath: String) -> String {
517515
518516func printUsageAndExit( _ message: String ) -> Never {
519517 let usage = " usage: macos-bundle.swift [-s|--skip-deps] [-c|--category video|games] binary [src_path] \n "
520- FileHandle . standardError. write ( usage. data ( using : . utf8) ! )
518+ FileHandle . standardError. write ( Data ( usage. utf8) )
521519 if !message. isEmpty {
522- FileHandle . standardError. write ( ( message + " \n " ) . data ( using : . utf8) ! )
520+ FileHandle . standardError. write ( Data ( ( message + " \n " ) . utf8) )
523521 }
524522 exit ( 2 )
525523}
584582
585583 print ( " done. " )
586584} catch {
587- FileHandle . standardError. write ( " error: \( error) \n " . data ( using : . utf8) ! )
585+ FileHandle . standardError. write ( Data ( " error: \( error) \n " . utf8) )
588586 exit ( 1 )
589587}
0 commit comments