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

Request: clasp status --json #163

Closed
ajlai opened this issue May 11, 2018 · 4 comments
Closed

Request: clasp status --json #163

ajlai opened this issue May 11, 2018 · 4 comments

Comments

@ajlai
Copy link
Contributor

ajlai commented May 11, 2018

Expected Behavior

clasp status has a --json switch to output status in a more parseable format (Currently would help with building out clasp status test cases).

> clasp status --json
{"filesToPush": ["Code.js", "appscript.json"], "untrackedFiles": ["ignored.txt"]}

Actual Behavior

> clasp status
The following files will be pushed by clasp push:
└─ Code.js
└─ appsscript.json
Untracked files:
└─ ignored.txt

Specifications

  • Node version (node -v)
  • Version (npm list -g | grep clasp):
  • OS (Mac/Linux/Windows)
@grant
Copy link
Contributor

grant commented May 11, 2018

Seems like a fine FR but I don't see the value in it. What' the use case?
For example, git status doesn't have a json option, but I'm sure it's been requested.
What about a deployments or versions --json option?

I'd not want to build this feature just yet as we could expand to have all methods have a json option or export our results in an API as suggested before.

@ajlai
Copy link
Contributor Author

ajlai commented May 11, 2018

While I'm building the clasp status tests, it'd be nice to not have to build additional (brittle) parsing just to deconstruct the status output to feed back into the tests.

@ajlai
Copy link
Contributor Author

ajlai commented May 11, 2018

FWIW git status has a --short or a --porcelain option that does make it easier to parse. https://git-scm.com/docs/git-status#_short_format
I considered that, but thought --json would be a much simpler approach for the same outcome.

@grant
Copy link
Contributor

grant commented May 16, 2018

Above PR was merged. Closing.

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

No branches or pull requests

3 participants