cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-10062) Error: EACCES: permission denied - update-notifier-cordova.json
Date Mon, 04 Apr 2016 06:27:25 GMT

    [ https://issues.apache.org/jira/browse/CB-10062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15223717#comment-15223717
] 

ASF GitHub Bot commented on CB-10062:
-------------------------------------

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.


> Error: EACCES: permission denied - update-notifier-cordova.json
> ---------------------------------------------------------------
>
>                 Key: CB-10062
>                 URL: https://issues.apache.org/jira/browse/CB-10062
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CLI
>         Environment: OSX El Capitan
> Jims-MBP:myApp jtryon$ cordova -v
> 5.4.0
> Jims-MBP:myApp jtryon$ node -v
> v4.2.2
> Jims-MBP:myApp jtryon$ npm -v
> 2.14.7
>            Reporter: Sergey Shakhnazarov
>            Assignee: Sergey Shakhnazarov
>              Labels: triaged
>
> ims-MBP:~ jtryon$ cordova -h
> /usr/local/lib/node_modules/cordova/node_modules/update-notifier/node_modules/configstore/index.js:53
>                 throw err;
>                 ^Error: EACCES: permission denied, open '/Users/jtryon/.config/configstore/update-notifier-cordova.json'
> You don't have access to this file.    at Error (native)
>    at Object.fs.openSync (fs.js:549:18)
>    at Object.fs.readFileSync (fs.js:397:15)
>    at Object.create.all.get (/usr/local/lib/node_modules/cordova/node_modules/update-notifier/node_modules/configstore/index.js:34:26)
>    at Object.Configstore (/usr/local/lib/node_modules/cordova/node_modules/update-notifier/node_modules/configstore/index.js:27:44)
>    at new UpdateNotifier (/usr/local/lib/node_modules/cordova/node_modules/update-notifier/index.js:34:17)
>    at module.exports (/usr/local/lib/node_modules/cordova/node_modules/update-notifier/index.js:123:23)
>    at checkForUpdates (/usr/local/lib/node_modules/cordova/src/cli.js:64:20)
>    at cli (/usr/local/lib/node_modules/cordova/src/cli.js:114:5)
>    at Object.<anonymous> (/usr/local/lib/node_modules/cordova/bin/cordova:41:1)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message