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

Frank Hennig edited comment on CB-4415 at 7/29/13 8:13 AM:
-----------------------------------------------------------

Thanks [~anis] for the fix.
Is it possible to create a release in git before it's published in a public npm 
repo? In this way it's easier to trace back a concrete Version in git.

In the same file I saw some other possible bugs. 

The string concatenation for the target directory is possible a bug. Not all 
systems has an ending slash on os.tmpdir(). For the target directory it's 
should be better to use path.join instead. 

Also the detection of user home directory is a possible bug. For windows 
systems should be used process.env.USERPROFILE or os.home().
                
      was (Author: schiller256):
    Thanks Anis Kadri for the fix.
Is it possible to create a release in git before it's published in a public npm 
repo? In this way it's easier to trace back a concrete Version in git.

In the same file I saw some other possible bugs. 

The string concatenation for the target directory is possible a bug. Not all 
systems has an ending slash on os.tmpdir(). For the target directory it's 
should be better to use path.join instead. 

Also the detection of user home directory is a possible bug. For windows 
systems should be used process.env.USERPROFILE or os.home().
                  
> settings in registry.js null
> ----------------------------
>
>                 Key: CB-4415
>                 URL: https://issues.apache.org/jira/browse/CB-4415
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugman
>         Environment: MacOS X 10.7.5
> node v0.10.13
> npm 1.3.2
>            Reporter: Frank Hennig
>            Assignee: Anis Kadri
>
> The command "cordova -d plugin add file" ends with an error: 
> TypeError: Cannot read property 'registry' of null
>     at getPackageInfo 
> (/Users/myUser/repo/git/cordova-cli/node_modules/plugman/src/registry/registry.js:34:22)
>     at 
> /Users/myUser/repo/git/cordova-cli/node_modules/plugman/src/registry/registry.js:172:13
>     at initSettings 
> (/Users/myUser/repo/git/cordova-cli/node_modules/plugman/src/registry/registry.js:208:9)
>     at Object.module.exports.fetch 
> (/Users/myUser/repo/git/cordova-cli/node_modules/plugman/src/registry/registry.js:170:9)
>     at Object.fetchPlugin [as fetch] 
> (/Users/myUser/repo/git/cordova-cli/node_modules/plugman/src/fetch.js:85:22)
>     at /Users/myUser/repo/git/cordova-cli/src/plugin.js:90:33
>     at Array.forEach (native)
>     at /Users/myUser/repo/git/cordova-cli/src/plugin.js:81:29
>     at /Users/myUser/repo/git/cordova-cli/src/hooker.js:67:25
>     at execute_scripts_serially 
> (/Users/myUser/repo/git/cordova-cli/src/hooker.js:94:9)
> Starting from Version 0.9.2 of cordova-plugman the file 
> src/registry/registry.js try to resolve the settings as local variable for 
> functions getPackageInfo and fetchPackage. In both cases settings are null.
> I'm thinking, after the last refactoring, someone forget to pass through the 
> settings parameter to both functions. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to