Skip to content

Commit

Permalink
fix(lockfile): use correct ffi method for global changes (#5742)
Browse files Browse the repository at this point in the history
### Description

Sharp eyes @arlyon caught that this we weren't using the correct FFI
function for checking for global lockfile changes.

This would cause a panic if it got hit since the response buffer
wouldn't decode correctly.

### Testing Instructions

Eyes

Co-authored-by: Chris Olszewski <Chris Olszewski>
  • Loading branch information
chris-olszewski authored Aug 16, 2023
1 parent b54f352 commit 4389640
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cli/internal/ffi/ffi.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ func GlobalChange(packageManager string, prevContents []byte, currContents []byt
CurrContents: currContents,
}
reqBuf := Marshal(&req)
resBuf := C.patches(reqBuf)
resBuf := C.global_change(reqBuf)
reqBuf.Free()

resp := ffi_proto.GlobalChangeResponse{}
Expand Down

0 comments on commit 4389640

Please sign in to comment.