[GitHub] cordova-cli pull request: CB-10062 Error: EACCES: permission denie...
Github user asfgit closed the pull request at: https://github.com/apache/cordova-cli/pull/242 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-cli pull request: CB-10062 Error: EACCES: permission denie...
Github user riknoll commented on a diff in the pull request: https://github.com/apache/cordova-cli/pull/242#discussion_r58406360 --- Diff: src/cli.js --- @@ -60,13 +60,23 @@ function init() { } function checkForUpdates() { -// Checks for available update and returns an instance -var notifier = updateNotifier({ -pkg: pkg -}); +try { +// Checks for available update and returns an instance +var notifier = updateNotifier({ +pkg: pkg +}); -// Notify using the built-in convenience method -notifier.notify(); +// Notify using the built-in convenience method +notifier.notify(); +} catch (e) { +// https://issues.apache.org/jira/browse/CB-10062 +if (e && e.message && /EACCES/.test(e.message)) { +console.log('Update notifier was not able to access the config file.\n' + --- End diff -- Ah, okay! --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-cli pull request: CB-10062 Error: EACCES: permission denie...
Github user daserge commented on a diff in the pull request: https://github.com/apache/cordova-cli/pull/242#discussion_r58332189 --- Diff: src/cli.js --- @@ -60,13 +60,23 @@ function init() { } function checkForUpdates() { -// Checks for available update and returns an instance -var notifier = updateNotifier({ -pkg: pkg -}); +try { +// Checks for available update and returns an instance +var notifier = updateNotifier({ +pkg: pkg +}); -// Notify using the built-in convenience method -notifier.notify(); +// Notify using the built-in convenience method +notifier.notify(); +} catch (e) { +// https://issues.apache.org/jira/browse/CB-10062 +if (e && e.message && /EACCES/.test(e.message)) { +console.log('Update notifier was not able to access the config file.\n' + --- End diff -- `checkForUpdates` is called before we subscribe for events. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-cli pull request: CB-10062 Error: EACCES: permission denie...
Github user riknoll commented on a diff in the pull request: https://github.com/apache/cordova-cli/pull/242#discussion_r58285316 --- Diff: src/cli.js --- @@ -60,13 +60,23 @@ function init() { } function checkForUpdates() { -// Checks for available update and returns an instance -var notifier = updateNotifier({ -pkg: pkg -}); +try { +// Checks for available update and returns an instance +var notifier = updateNotifier({ +pkg: pkg +}); -// Notify using the built-in convenience method -notifier.notify(); +// Notify using the built-in convenience method +notifier.notify(); +} catch (e) { +// https://issues.apache.org/jira/browse/CB-10062 +if (e && e.message && /EACCES/.test(e.message)) { +console.log('Update notifier was not able to access the config file.\n' + --- End diff -- Instead of `console.log`, why not `events.emit`? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-cli pull request: CB-10062 Error: EACCES: permission denie...
GitHub user daserge opened a pull request: https://github.com/apache/cordova-cli/pull/242 CB-10062 Error: EACCES: permission denied - update-notifier-cordova.json Catch permissions error and print a workaround [Jira issue](https://issues.apache.org/jira/browse/CB-10062) You can merge this pull request into a Git repository by running: $ git pull https://github.com/MSOpenTech/cordova-cli CB-10062 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-cli/pull/242.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #242 commit 24865b92be955c7c3d47b2a99c7dc296ba98c264 Author: daserge Date: 2016-04-01T09:12:26Z CB-10062 Error: EACCES: permission denied - update-notifier-cordova.json Catch permissions error and print a workaround --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org