Skip to content

Commit

Permalink
Rename var
Browse files Browse the repository at this point in the history
  • Loading branch information
doriable committed Dec 9, 2024
1 parent 7b48937 commit 7a9406d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions private/buf/cmd/buf/command/plugin/pluginprune/pluginprune.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,18 +100,18 @@ func prune(
if err != nil {
return err
}
var updatedBufLockPluginKeys []bufplugin.PluginKey
var prunedBufLockPluginKeys []bufplugin.PluginKey
for _, existingRemotePluginKey := range existingRemotePluginKeys {
// Check if an existing plugin key from the buf.lock is confiugred in the buf.yaml.
if _, ok := bufYAMLPluginKeys[existingRemotePluginKey.String()]; ok {
// If yes, then we keep it for the updated buf.lock.
updatedBufLockPluginKeys = append(updatedBufLockPluginKeys, existingRemotePluginKey)
prunedBufLockPluginKeys = append(prunedBufLockPluginKeys, existingRemotePluginKey)
}
}
// We keep the existing dep module keys as-is.
existingDepModuleKeys, err := workspaceDepManager.ExistingBufLockFileDepModuleKeys(ctx)
if err != nil {
return err
}
return workspaceDepManager.UpdateBufLockFile(ctx, existingDepModuleKeys, updatedBufLockPluginKeys)
return workspaceDepManager.UpdateBufLockFile(ctx, existingDepModuleKeys, prunedBufLockPluginKeys)
}

0 comments on commit 7a9406d

Please sign in to comment.