{"record":{"id":"5df82854443bcb17","repo":"pulumi/pulumi","slug":"checksum-is-only-valid-if-a-specific-package-is","errorCode":null,"errorMessage":"--checksum is only valid if a specific package is being installed","messagePattern":"--checksum is only valid if a specific package is being installed","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/cmd/pulumi/plugin/plugin_install.go","lineNumber":260,"sourceCode":"\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\tpluginSpec = updatedSpec\n\t\t\t}\n\t\t} else if version == nil && pluginSpec.Version == nil {\n\t\t\t// If we don't have a version try to look one up\n\t\t\tlatestVersion, err := cmd.pluginGetLatestVersion(pluginSpec, ctx)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tpluginSpec.Version = latestVersion\n\t\t}\n\t\tinstalls = append(installs, pluginSpec)\n\t} else {\n\t\tif cmd.file != \"\" {\n\t\t\treturn errors.New(\"--file (-f) is only valid if a specific package is being installed\")\n\t\t}\n\t\tif cmd.checksum != \"\" {\n\t\t\treturn errors.New(\"--checksum is only valid if a specific package is being installed\")\n\t\t}\n\n\t\t// If a specific plugin wasn't given, compute the set of plugins the current project needs.\n\t\tplugins, err := getProjectPlugins(ctx)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tfor _, plugin := range plugins {\n\t\t\t// TODO[pulumi/pulumi#956]: eventually we will want to honor and\n\t\t\t// install all plugins in the usual way.\n\t\t\tif !workspace.IsPluginBundled(plugin.Kind, plugin.Name) {\n\t\t\t\tinstalls = append(installs, plugin)\n\t\t\t}\n\t\t}\n\t}\n\n\t// Now for each kind, name, version pair, download it from the release website, and install it.\n\tbars := progress.NewGroup(cmd.stderr)","sourceCodeStart":242,"sourceCodeEnd":278,"githubUrl":"https://github.com/pulumi/pulumi/blob/793f7b2e160db4321fb7fb6b0607461e01cb251e/pkg/cmd/pulumi/plugin/plugin_install.go#L242-L278","documentation":"Like --file, the `--checksum` flag is only meaningful when installing one specific plugin; in bulk (no-argument) mode there is no single artifact to verify, so the CLI returns this error when --checksum is set without plugin arguments.","triggerScenarios":"Running `pulumi plugin install --checksum <hexdigest>` (or `pulumi plugin install --checksum ... ` with no kind/name args) to install all project plugins.","commonSituations":"Adding --checksum to a shared install script that installs all project plugins; copy-pasting a single-plugin checksum command into a bulk install context.","solutions":["Name the specific plugin along with --checksum: pulumi plugin install resource <name> <version> --checksum <hex>","If you want to install all project plugins, remove the --checksum flag","To verify every project plugin, rely on the checksums recorded in the project's package specs instead"],"exampleFix":"// before\n$ pulumi plugin install --checksum abc123...\n// after\n$ pulumi plugin install resource myprovider 1.2.3 --checksum abc123...","handlingStrategy":"validation","validationCode":"if (useChecksumFlag && !explicitPluginArgs) {\n  throw new Error('--checksum requires an explicit plugin: pulumi plugin install <kind> <name> <version> --checksum <hex>');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only pass --checksum together with kind/name/version args","Rely on project package-spec checksums for bulk installs instead of a single --checksum value"],"tags":["cli","plugin-install","arguments"],"backgroundTag":"flag-requires-argument","analyzedSha":"793f7b2e160db4321fb7fb6b0607461e01cb251e","analyzedAt":"2026-08-31T09:36:43.099Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}