Skip to content

Commit

Permalink
Improve error handling in Builder
Browse files Browse the repository at this point in the history
  • Loading branch information
xtyxtyx committed Jan 3, 2025
1 parent 233b810 commit 02e6501
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Plugins/BuilderPlugin/Steps/MacOSBundleStep.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@ func executeMacOSBundleStep(_ input: MacOSBundleInput, context: StepContext) {

if !buildResult.succeeded {
print("Build failed. See logs above for details.")
return
exit(1)
}

guard let mainArtifect = buildResult.builtArtifacts.first else {
print("No built artifacts found. Skipping bundle creation.")
return
print("No built artifacts found. Cannot create bundle.")
exit(1)
}
print("Main artifact: \(mainArtifect.path.string)")

if mainArtifect.kind != .executable {
print("Main artifact is \(mainArtifect.kind). Skipping bundle creation.")
return
print("Main artifact is \(mainArtifect.kind). Cannot create bundle.")
exit(1)
}

print("Creating bundle with input: \(input)")
Expand Down

0 comments on commit 02e6501

Please sign in to comment.