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

Dxcdt 393 ensure status and progress indicator #949

Merged
merged 29 commits into from
Dec 21, 2023
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
4461350
Bump github.com/auth0/go-auth0 from 1.2.0 to 1.3.0 (#908)
dependabot[bot] Nov 13, 2023
2054394
dxcdt-615-goreleaser-upgrade (#909)
Nov 13, 2023
1da3631
DXCDT-582: Convert audience into a drop down in interactive mode in t…
sergiught Nov 11, 2023
7dbf8ea
Merge branch 'main' of https://github.com/auth0/auth0-cli
Nov 13, 2023
1fd7dc2
Merge branch 'main' of https://github.com/auth0/auth0-cli
Nov 16, 2023
60f801c
Merge branch 'main' of https://github.com/auth0/auth0-cli
Nov 22, 2023
b0fd941
Merge remote-tracking branch 'upstream/main'
Nov 29, 2023
be1ef00
Merge branch 'main' of https://github.com/auth0/auth0-cli
Dec 1, 2023
3068c07
Bump goreleaser version
Dec 1, 2023
5265f19
Merge remote-tracking branch 'origin/main'
Dec 8, 2023
c0deaff
Use progress bars for long multistep processes
Dec 13, 2023
09d32e9
Bump github.com/google/uuid from 1.4.0 to 1.5.0 (#942)
dependabot[bot] Dec 13, 2023
f51b8f7
Dxcdt 578 increase results amount in lists (#940)
Dec 13, 2023
a2550ed
Bump github.com/auth0/go-auth0 from 1.3.1 to 1.4.0 (#944)
dependabot[bot] Dec 15, 2023
364b643
DXCDT-396: Standardize error messages (#943)
sergiught Dec 19, 2023
a87580d
Bump golang.org/x/crypto from 0.16.0 to 0.17.0 (#947)
dependabot[bot] Dec 19, 2023
10d585c
Merge branch 'main' of github.com:auth0/auth0-cli into DXCDT-393-ensu…
Dec 20, 2023
a6e3565
Ignore err for adding steps to the ProgressBar
Dec 20, 2023
d56d66c
Merge branch 'main' of github.com:auth0/auth0-cli into DXCDT-393-ensu…
Dec 21, 2023
ba1bf27
Organize imports
Dec 21, 2023
d588b4f
Improve error messages in APIs
Dec 21, 2023
070b652
Add documentation comment for ProgressBar
Dec 21, 2023
8f759cf
Normalize delete error messages
Dec 21, 2023
463832a
Merge remote-tracking branch 'origin/DXCDT-393-ensure-status-and-prog…
Dec 21, 2023
2c258c3
Discard duplicate path escape
Dec 21, 2023
ca57dfd
Revert data file
Dec 21, 2023
973a813
Return nil on 0 case
Dec 21, 2023
8733ebf
Ensure ID isn't empty when deleting an organization
Dec 21, 2023
becfda9
Merge branch 'main' into DXCDT-393-ensure-status-and-progress-indicator
Dec 21, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Ensure ID isn't empty when deleting an organization
Michael Christenson II committed Dec 21, 2023
commit 8733ebf1122eaf3f477aa58cd7c3c0c256255b02
12 changes: 7 additions & 5 deletions internal/cli/organizations.go
Original file line number Diff line number Diff line change
@@ -438,12 +438,14 @@ func deleteOrganizationCmd(cli *cli) *cobra.Command {
}

return ansi.ProgressBar("Deleting organization(s)", ids, func(_ int, id string) error {
if _, err := cli.api.Organization.Read(cmd.Context(), id); err != nil {
return fmt.Errorf("failed to delete organization with ID %q: %w", id, err)
}
if id != "" {
if _, err := cli.api.Organization.Read(cmd.Context(), id); err != nil {
return fmt.Errorf("failed to delete organization with ID %q: %w", id, err)
}

if err := cli.api.Organization.Delete(cmd.Context(), id); err != nil {
return fmt.Errorf("failed to delete organization with ID %q: %w", id, err)
if err := cli.api.Organization.Delete(cmd.Context(), id); err != nil {
return fmt.Errorf("failed to delete organization with ID %q: %w", id, err)
}
}
return nil
})