Skip to content

Commit

Permalink
cmd: allow packer-sdc fix on the SDK
Browse files Browse the repository at this point in the history
Before this commit, `packer-sdc fix' would only work on plugins that
import the SDK, but we also need to make `packer-sdc fix' compatible
with the SDK itself, so we add an extra check to packer-sdc so it
doesn't ignore the SDK when applying the replace fix.
  • Loading branch information
lbajolet-hashicorp committed Aug 1, 2023
1 parent f4e5599 commit 1008a3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/packer-sdc/internal/fix/gocty.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func (f goCtyFix) fix(modFilePath string, data []byte) ([]byte, error) {

var requiresSDK, requiresGoCty bool
for _, req := range mf.Require {
if req.Mod.Path == sdkPath {
if req.Mod.Path == sdkPath || mf.Module.Mod.Path == sdkPath {
requiresSDK = true
}
if req.Mod.Path == f.OldPath {
Expand Down

0 comments on commit 1008a3b

Please sign in to comment.