cmd/root: Limit the scope of the error
https://github.com/containers/toolbox/pull/542
This commit is contained in:
parent
354a69bede
commit
10b7de5e6c
|
@ -243,9 +243,7 @@ func migrate() error {
|
|||
|
||||
migrateLockFD := migrateLockFile.Fd()
|
||||
migrateLockFDInt := int(migrateLockFD)
|
||||
|
||||
err = syscall.Flock(migrateLockFDInt, syscall.LOCK_EX)
|
||||
if err != nil {
|
||||
if err := syscall.Flock(migrateLockFDInt, syscall.LOCK_EX); err != nil {
|
||||
return fmt.Errorf("failed to acquire migration lock")
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue