Skip to content

Commit

Permalink
Don't load snapshot just to show stack name (#9199)
Browse files Browse the repository at this point in the history
* Don't load snapshot just to show stack name

* Add to CHANGELOG
  • Loading branch information
Frassle committed Mar 15, 2022
1 parent dff590b commit 5a86cef
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG_PENDING.md
Expand Up @@ -4,11 +4,14 @@
- [language/dotnet] - Updated Pulumi dotnet packages to use grpc-dotnet instead of grpc.
[#9149](https://github.com/pulumi/pulumi/pull/9149)

- [cli/config] Rename the `config` property in `Pulumi.yaml` to `stackConfigDir`. The `config` key will continue to be supported.
- [cli/config] - Rename the `config` property in `Pulumi.yaml` to `stackConfigDir`. The `config` key will continue to be supported.
[#9145](https://github.com/pulumi/pulumi/pull/9145)

- [cli/plugins] Add support for downloading plugin from private Pulumi GitHub releases. This also drops the use of the `GITHUB_ACTOR` and `GITHUB_PERSONAL_ACCESS_TOKEN` environment variables for authenticating to github. Only `GITHUB_TOKEN` is now used, but this can be set to a personal access token.
[#9185](https://github.com/pulumi/pulumi/pull/9185)

- [cli] - Speed up `pulumi stack --show-name` by skipping unneeded snapshot loading.
[#9199](https://github.com/pulumi/pulumi/pull/9199)

### Bug Fixes

Expand Down
9 changes: 5 additions & 4 deletions pkg/cmd/pulumi/stack.go
Expand Up @@ -56,16 +56,17 @@ func newStackCmd() *cobra.Command {
if err != nil {
return err
}
snap, err := s.Snapshot(commandContext())
if err != nil {
return err
}

if showStackName {
fmt.Printf("%s\n", s.Ref().Name())
return nil
}

snap, err := s.Snapshot(commandContext())
if err != nil {
return err
}

// First print general info about the current stack.
fmt.Printf("Current stack is %s:\n", s.Ref())

Expand Down

0 comments on commit 5a86cef

Please sign in to comment.