-
Notifications
You must be signed in to change notification settings - Fork 340
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
remove potential error when setting exit code #640
Conversation
this commit implements a more reliable way of setting the CLI's exit code in error cases. Previously, I encountered this error when running the cli: ```console $ cordova build TypeError [ERR_INVALID_ARG_TYPE]: The "code" argument must be of type number. Received type string ('ERR_UNHANDLED_ERROR') at process.set [as exitCode] (node:internal/bootstrap/node:123:9) at /opt/nodejs/lib/node_modules/cordova/bin/cordova:33:22 ``` With this version, I get to see the root problem: ```console $ cordova build Unhandled error. ('Parsing /home/me/hello/config.xml failed') ```
sorry to ignore the PR format, but... very simple change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #640 +/- ##
=======================================
Coverage 70.68% 70.68%
=======================================
Files 4 4
Lines 307 307
=======================================
Hits 217 217
Misses 90 90 ☔ View full report in Codecov by Sentry. |
All test passes. If there are no objections in the next couple of days or so I'll do a merge so that this change is included on our next release. |
Good evening, did you manage to resolve it? I’ve tried everything and still couldn’t fix it. This error appeared out of nowhere. For example, at 8 PM I ran cordova platform add android, and at 10 PM I removed the platform and ran cordova platform add android again, and this is what appeared: typescript |
Yeah, but change my not made its way into distributed releases yet
…-------- Original message --------
From: Riquelme1075 ***@***.***>
Date: 7/30/24 9:27 PM (GMT-05:00)
To: apache/cordova-cli ***@***.***>
Cc: Dillon Shaffer ***@***.***>, Author ***@***.***>
Subject: Re: [apache/cordova-cli] remove potential error when setting exit code (PR #640)
Good evening, did you manage to resolve it? I’ve tried everything and still couldn’t fix it. This error appeared out of nowhere. For example, at 8 PM I ran cordova platform add android, and at 10 PM I removed the platform and ran cordova platform add android again, and this is what appeared:
typescript
Copiar código
C:\app teste\rclmarcador\rclmarcador>cordova platform add android
TypeError [ERR_INVALID_ARG_TYPE]: The "code" argument must be of type number. Received type string ('ERR_UNHANDLED_ERROR')
at process.set [as exitCode] (node:internal/bootstrap/node:123:9)
at C:\Users\maria\AppData\Roaming\npm\node_modules\cordova\bin\cordova:32:22
—
Reply to this email directly, view it on GitHub<#640 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ALDBE5CD2OPS7BCSYQ7FX5TZPA4QLAVCNFSM6AAAAABH677KLGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJZGQ2TSNJQGU>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
this PR implements a more reliable way of setting the CLI's exit code in error cases.
Previously, I encountered this error when running the cli:
With this version, I get to see the root problem:
Platforms affected
Motivation and Context
Description
Testing
Checklist
(platform)
if this change only applies to one platform (e.g.(android)
)