File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -761,7 +761,14 @@ public final class ManifestLoader: ManifestLoaderProtocol {
761
761
#else
762
762
let executableSuffix = " "
763
763
#endif
764
- let compiledManifestFile = tmpDir. appending ( component: " \( packageIdentity) -manifest \( executableSuffix) " )
764
+ // Create a canonical package name that's suitable as a path component
765
+ let canonicalPackageName = packageIdentity. description
766
+ . split ( separator: " / " , omittingEmptySubsequences: true )
767
+ . joined ( separator: " - " )
768
+ . map { $0. isASCII ? " \( $0) " : " - " }
769
+ . joined ( )
770
+
771
+ let compiledManifestFile = tmpDir. appending ( component: " \( canonicalPackageName) -manifest \( executableSuffix) " )
765
772
cmd += [ " -o " , compiledManifestFile. pathString]
766
773
767
774
// Compile the manifest.
@@ -775,7 +782,7 @@ public final class ManifestLoader: ManifestLoaderProtocol {
775
782
}
776
783
777
784
// Pass an open file descriptor of a file to which the JSON representation of the manifest will be written.
778
- let jsonOutputFile = tmpDir. appending ( component: " \( packageIdentity ) -output.json " )
785
+ let jsonOutputFile = tmpDir . appending ( component: " \( canonicalPackageName ) -output.json " )
779
786
guard let jsonOutputFileDesc = fopen ( jsonOutputFile. pathString, " w " ) else {
780
787
throw StringError ( " couldn't create the manifest's JSON output file " )
781
788
}
You can’t perform that action at this time.
0 commit comments