Skip to content

Commit

Permalink
Add SIGINT handling for Git Lfs, refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
mikusaq committed Nov 7, 2024
1 parent fb50fe3 commit 58930c0
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions bap-builder/PackageMode.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,20 +241,19 @@ func BuildPackage(cmdLine *BuildPackageCmdLineArgs, contextPath string) error {
if err != nil {
return err
}
buildAll := cmdLine.All
if *buildAll {

handleRemover := bringauto_process.SignalHandlerAddHandler(repo.RestoreAllChanges)
if *cmdLine.All {
err = buildAllPackages(cmdLine, contextPath, platformString, repo)
if err != nil {
repo.RestoreAllChanges()
return err
}
} else {
err = buildSinglePackage(cmdLine, contextPath, platformString, repo)
}
err = buildSinglePackage(cmdLine, contextPath, platformString, repo)
if err != nil {
repo.RestoreAllChanges()
handleRemover()
return err
}
repo.CommitAllChanges()
handleRemover()
return nil
}

Expand Down

0 comments on commit 58930c0

Please sign in to comment.