Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix logic that permits some commands to run without auth #741

Merged
merged 1 commit into from
Apr 15, 2023

Conversation

sergiught
Copy link
Contributor

🔧 Changes

This PR fixes erronousely requiring authentication for the completion command.

📚 References

🔬 Testing

📝 Checklist

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

}

// config init shouldn't trigger a login.
if cmd.CalledAs() == "init" && cmd.Parent().Use == "config" {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The config command was removed. So this shouldn't have been here.

}

// Selecting tenants shouldn't really trigger a login.
if cmd.Parent().Use == "tenants" && (cmd.Use == "use" || cmd.Use == "add") {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tenants add command was removed. So this shouldn't have been here.

@sergiught sergiught marked this pull request as ready for review April 14, 2023 17:06
@sergiught sergiught requested a review from a team as a code owner April 14, 2023 17:06
@codecov-commenter
Copy link

Codecov Report

Patch coverage: 94.11% and project coverage change: +0.07 🎉

Comparison is base (4a1f062) 70.83% compared to head (edcb74f) 70.90%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #741      +/-   ##
==========================================
+ Coverage   70.83%   70.90%   +0.07%     
==========================================
  Files          87       87              
  Lines       11211    11209       -2     
==========================================
+ Hits         7941     7948       +7     
+ Misses       2750     2744       -6     
+ Partials      520      517       -3     
Impacted Files Coverage Δ
internal/cli/root.go 92.48% <94.11%> (+6.55%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@sergiught sergiught merged commit 4f88a7d into main Apr 15, 2023
@sergiught sergiught deleted the patch/fix-commands-not-needing-login branch April 15, 2023 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants