Skip to content

Commit

Permalink
Include the versions in the error message (#1147)
Browse files Browse the repository at this point in the history
Include the versions in question in the error message when the installed version does not satisfy the resolved version. So we can see what the actual problem is.
  • Loading branch information
justinvp authored Apr 11, 2024
1 parent 99aa1ae commit ccec4e0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

---

## 5.2.1 (2024-04-11)

- fix: include the versions in the error message
([#1147](https://github.com/pulumi/actions/pull/1147))

## 5.2.0 (2024-03-26)

- feat: support disabling progress dots and outputs printing
Expand Down
2 changes: 1 addition & 1 deletion src/libs/pulumi-cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,6 @@ export async function downloadCli(range: string): Promise<void> {
const pulumiVersion = versionExec.stdout.trim();
core.debug(`Running pulumi verison returned: ${pulumiVersion}`);
if (!semver.satisfies(pulumiVersion, version)) {
throw new Error('Installed version did not satisfy the resolved version');
throw new Error(`Installed version "${pulumiVersion}" did not satisfy the resolved version "${version}"`);
}
}

0 comments on commit ccec4e0

Please sign in to comment.