File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Plugins/PackageToJS/Tests Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -73,6 +73,25 @@ extension Trait where Self == ConditionTrait {
7373 enumerator. skipDescendants ( )
7474 continue
7575 }
76+
77+ // Copy symbolic links
78+ if let resourceValues = try ? sourcePath. resourceValues ( forKeys: [ . isSymbolicLinkKey] ) ,
79+ resourceValues. isSymbolicLink == true
80+ {
81+ try FileManager . default. createDirectory (
82+ at: destinationPath. deletingLastPathComponent ( ) ,
83+ withIntermediateDirectories: true ,
84+ attributes: nil
85+ )
86+ let linkDestination = try ! FileManager . default. destinationOfSymbolicLink ( atPath: sourcePath. path)
87+ try FileManager . default. createSymbolicLink (
88+ atPath: destinationPath. path,
89+ withDestinationPath: linkDestination
90+ )
91+ enumerator. skipDescendants ( )
92+ continue
93+ }
94+
7695 // Skip directories
7796 var isDirectory : ObjCBool = false
7897 if FileManager . default. fileExists ( atPath: sourcePath. path, isDirectory: & isDirectory) {
You can’t perform that action at this time.
0 commit comments