clasp
clasp copied to clipboard
Improve output (and suppress GaxiosError) on failed push
Fixes #827, #907
- Suppresses
GaxiosError
object dump on failed push - Instead, only
error.message
is output to the console - Always calls
stopSpinner()
before outputting to console - Only shows project file list and success message when no error is thrown
- Formats syntax error message file path and line number as parsable by IDEs
- Outputs formatted code snippet of the error line
Checklist
- [x]
npm run test
succeeds. - [x]
npm run lint
succeeds. - [x] Appropriate changes to README are included in PR.
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
:memo: Please visit https://cla.developers.google.com/ to sign.
Once you've signed (or fixed any issues), please reply here with @googlebot I signed it!
and we'll verify it.
What to do if you already signed the CLA
Individual signers
- It's possible we don't have your GitHub username or you're using a different email address on your commit. Check your existing CLA data and verify that your email is set on your git commits.
Corporate signers
- Your company has a Point of Contact who decides which employees are authorized to participate. Ask your POC to be added to the group of authorized contributors. If you don't know who your Point of Contact is, direct the Google project maintainer to go/cla#troubleshoot (Public version).
- The email used to register you as an authorized contributor must be the email used for the Git commit. Check your existing CLA data and verify that your email is set on your git commits.
- The email used to register you as an authorized contributor must also be attached to your GitHub account.
ℹ️ Googlers: Go here for more info.
@googlebot I signed it!
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.
. If the bot doesn't comment, it means it doesn't think anything has changed.
ℹ️ Googlers: Go here for more info.
Is this interesting contribution blocked just because of a failed CLA detection by google bot ?! @Nu11u5 can you try to sign with your github e-mail address nu***[email protected] ?
Is this interesting contribution blocked just because of a failed CLA detection by google bot ?! @Nu11u5 can you try to sign with your github e-mail address nu***[email protected] ?
I think I submitted my commit wrong, instead of using @users.noreply.github.com, so GitHub can't associate it with my account. Attempting to fix.
@alex-galey - fixed, thanks for pinging me the reminder.
Recommited with merge conflicts properly resolved. Added syntax error output formatting so that file names and line numbers can be parsed by popular IDEs and linked to the source file. Tested in VS Code.
Is your PR also aims to solve that behavior of clasp not throwing an error when a Gaxios error happens and concluding with a misleading message "Pushed x files." when it didn't successfully push ?
Is your PR also aims to solve that behavior of clasp not throwing an error when a Gaxios error happens and concluding with a misleading message "Pushed x files." when it didn't successfully push ?
Yes, the success message and file list will now only be output when the push succeeds.
If it fails due to a syntax error detected by GAS, it will return a single line error message that can be automatically linked to the source file/line in an IDE like VS Code.
Any other type of error from GAS will return just the error description instead of dumping everything to the terminal.
@PopGoesTheWza is there a chance this PR is merged or do you see anything else that should be worked on ?
Hi @sqrrrl, is there a chance this PR is merged or do you see anything else that should be worked on ?
@alex-galey thanks for trying to bring attention to this. I had honestly forgotten about this PR. Please share of any additional work should be done.
@sqrrrl do you have any insight why this PR is not being merged ?
I need this PR for me too. Why not merge?