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

Better output on `ls` commands when no resources to show #734

Open
SoManyHs opened this issue Mar 12, 2020 · 1 comment
Open

Better output on `ls` commands when no resources to show #734

SoManyHs opened this issue Mar 12, 2020 · 1 comment

Comments

@SoManyHs
Copy link
Contributor

@SoManyHs SoManyHs commented Mar 12, 2020

Currently on env ls and app ls with no envs or apps:

$ ecs-preview env ls

$ ecs-preview app ls
Name                Type
----                ----

It would be nice to hav a similar output to app show when there are no apps:

$ ecs-preview app show
No applications found in project backend
.
@WillHoule
Copy link

@WillHoule WillHoule commented Mar 13, 2020

Put together a quick fix that gives the following output:

❯ ./bin/local/ecs-preview env ls

? Which project's environments would you like to list? test-project
No environments to list for project "test-project"
❯ ./bin/local/ecs-preview app ls

? Which project's applications would you like to list? test-project
Sorry! No configured apps found for the project "test-project"

Just checking the length of envs and opts.applications with an if/else. I think there may be some more room for deduping the writer logic here, but I'm not sure I want to over-complicate things :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant