Skip to content

Commit

Permalink
Also unlock the file when building PKGBUILD files
Browse files Browse the repository at this point in the history
  • Loading branch information
xyproto committed Sep 2, 2024
1 parent 72acbe1 commit d7b4cb1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions v2/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,11 @@ func (e *Editor) GenerateBuildCommand(c *vt100.Canvas, tty *vt100.TTY, filename
if foundCommand {
// Save and exec / replace the process with syscall.Exec
if e.Save(c, tty) == nil { // success
// Unlock and save the lock file
if absFilename, err := filepath.Abs(e.filename); fileLock != nil && err == nil { // success
fileLock.Unlock(absFilename)
fileLock.Save()
}
quitExecShellCommand(tty, sourceDir, s) // The program ends here
}
// Could not save the file, execute the command in a separate process
Expand Down

0 comments on commit d7b4cb1

Please sign in to comment.