Skip to content

Commit

Permalink
return a warning instead of an error on login failure
Browse files Browse the repository at this point in the history
Aparently `pulumi login` can fail, and yet other pulumi commands that
follow can succeed (see #1081).

Instead of failing outright when login fails, just print a warning, so
people are not confused when further errors happen later.
  • Loading branch information
tgummerer committed Jan 24, 2024
1 parent 41191e2 commit 169de4b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## HEAD (Unreleased)

- fix: only warn when login fails instead of erroring
([#1082](https://github.com/pulumi/actions/pull/1062))

---

## 5.1.0 (2024-01-24)
Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const runAction = async (config: Config): Promise<void> => {
await pulumiCli.downloadCli(config.pulumiVersion);
const result = await login(config.cloudUrl);
if (!result.success) {
throw new Error(result.stderr);
core.warning(`Failed to login to Pulumi service: ${result.error}`);
}

const workDir = resolve(
Expand Down

0 comments on commit 169de4b

Please sign in to comment.