File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Sources/SwiftBundler/Commands Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -692,13 +692,20 @@ struct BundleCommand: ErrorHandledCommand {
692692 }
693693
694694 if resolvedPlatform == . linux {
695+ let debugInfoFile = originalExecutableArtifact. appendingPathExtension ( " debug " )
696+ if debugInfoFile. exists ( ) {
697+ try FileManager . default. removeItem ( at: debugInfoFile)
698+ }
695699 try await Stripper . extractLinuxDebugInfo (
696700 from: originalExecutableArtifact,
697- to: originalExecutableArtifact . appendingPathExtension ( " debug " )
701+ to: debugInfoFile
698702 ) . unwrap ( )
699703 }
700704
701705 if arguments. strip {
706+ if executableArtifact. exists ( ) {
707+ try FileManager . default. removeItem ( at: executableArtifact)
708+ }
702709 try FileManager . default. copyItem ( at: originalExecutableArtifact, to: executableArtifact)
703710 try await Stripper . strip ( executableArtifact) . unwrap ( )
704711 }
You can’t perform that action at this time.
0 commit comments