[jira] [Commented] (CB-11730) plugman miss the last file/folder when installing plugin on windows
[ https://issues.apache.org/jira/browse/CB-11730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15583971#comment-15583971 ] ASF GitHub Bot commented on CB-11730: - Github user asfgit closed the pull request at: https://github.com/apache/cordova-lib/pull/484 > plugman miss the last file/folder when installing plugin on windows > --- > > Key: CB-11730 > URL: https://issues.apache.org/jira/browse/CB-11730 > Project: Apache Cordova > Issue Type: Bug > Components: CordovaLib >Affects Versions: 6.3.1 > Environment: Windows > plugman --version > 1.2.1 > cordova --version > 6.3.1 >Reporter: Yasuharu Seki >Priority: Minor > Labels: triaged > > Steps to reproduce: > - Create simple plugin > $ plugman create --name SimplePlugin --plugin_id org.simple.plugin > --plugin_version 1.0.0 > - Create cordova project it includes the name of plugin > $ cordova create SimplePlugin_TestBed > - Install the plugin into the created project > $ cordova plugin add ../SimplePlugin > -> Check the plugins/org.simple.plugin folder > Find www/ folder is missing. > The reason is filenames.indexOf(relativeRootFolder) returns -1 when the > target folder name cannot find in the plugin folder. > The original code works good when the project is on the child folder. > [plugin]/[project of plugin_testbed] > But does not the project as sibling. > [plugin] > [project of plugin_testbed] -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-11730) plugman miss the last file/folder when installing plugin on windows
[ https://issues.apache.org/jira/browse/CB-11730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15583968#comment-15583968 ] ASF subversion and git services commented on CB-11730: -- Commit 92fd4efc5aecdbc836b5f6dd0c1b2d560a0579d1 in cordova-lib's branch refs/heads/master from [~yseki] [ https://git-wip-us.apache.org/repos/asf?p=cordova-lib.git;h=92fd4ef ] [CB-11730] Modify condition of if clause to avoid similar project name with plugin name > plugman miss the last file/folder when installing plugin on windows > --- > > Key: CB-11730 > URL: https://issues.apache.org/jira/browse/CB-11730 > Project: Apache Cordova > Issue Type: Bug > Components: CordovaLib >Affects Versions: 6.3.1 > Environment: Windows > plugman --version > 1.2.1 > cordova --version > 6.3.1 >Reporter: Yasuharu Seki >Priority: Minor > Labels: triaged > > Steps to reproduce: > - Create simple plugin > $ plugman create --name SimplePlugin --plugin_id org.simple.plugin > --plugin_version 1.0.0 > - Create cordova project it includes the name of plugin > $ cordova create SimplePlugin_TestBed > - Install the plugin into the created project > $ cordova plugin add ../SimplePlugin > -> Check the plugins/org.simple.plugin folder > Find www/ folder is missing. > The reason is filenames.indexOf(relativeRootFolder) returns -1 when the > target folder name cannot find in the plugin folder. > The original code works good when the project is on the child folder. > [plugin]/[project of plugin_testbed] > But does not the project as sibling. > [plugin] > [project of plugin_testbed] -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-11730) plugman miss the last file/folder when installing plugin on windows
[ https://issues.apache.org/jira/browse/CB-11730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15583969#comment-15583969 ] ASF subversion and git services commented on CB-11730: -- Commit a170a465ec0a2dc4bbc98bfa47e03041521cf22e in cordova-lib's branch refs/heads/master from [~yseki] [ https://git-wip-us.apache.org/repos/asf?p=cordova-lib.git;h=a170a46 ] [CB-11730] Change the expression of folder separator charactor This closes #484 > plugman miss the last file/folder when installing plugin on windows > --- > > Key: CB-11730 > URL: https://issues.apache.org/jira/browse/CB-11730 > Project: Apache Cordova > Issue Type: Bug > Components: CordovaLib >Affects Versions: 6.3.1 > Environment: Windows > plugman --version > 1.2.1 > cordova --version > 6.3.1 >Reporter: Yasuharu Seki >Priority: Minor > Labels: triaged > > Steps to reproduce: > - Create simple plugin > $ plugman create --name SimplePlugin --plugin_id org.simple.plugin > --plugin_version 1.0.0 > - Create cordova project it includes the name of plugin > $ cordova create SimplePlugin_TestBed > - Install the plugin into the created project > $ cordova plugin add ../SimplePlugin > -> Check the plugins/org.simple.plugin folder > Find www/ folder is missing. > The reason is filenames.indexOf(relativeRootFolder) returns -1 when the > target folder name cannot find in the plugin folder. > The original code works good when the project is on the child folder. > [plugin]/[project of plugin_testbed] > But does not the project as sibling. > [plugin] > [project of plugin_testbed] -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-11730) plugman miss the last file/folder when installing plugin on windows
[ https://issues.apache.org/jira/browse/CB-11730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15575596#comment-15575596 ] ASF GitHub Bot commented on CB-11730: - Github user codecov-io commented on the issue: https://github.com/apache/cordova-lib/pull/484 ## [Current coverage](https://codecov.io/gh/apache/cordova-lib/pull/484?src=pr) is 80.43% (diff: 100%) > Merging [#484](https://codecov.io/gh/apache/cordova-lib/pull/484?src=pr) into [master](https://codecov.io/gh/apache/cordova-lib/branch/master?src=pr) will decrease coverage by **0.35%** ```diff @@ master #484 diff @@ == Files68 67 -1 Lines 5407 5197 -210 Methods 857838-19 Messages 0 0 Branches 1048 1007-41 == - Hits 4368 4180 -188 + Misses 1039 1017-22 Partials 0 0 ``` > Powered by [Codecov](https://codecov.io?src=pr). Last update [3b38b53...3c92340](https://codecov.io/gh/apache/cordova-lib/compare/3b38b5382b9a52d1fe522514b61d3ebd6016796d...3c923408cb83597d551ee6c6c3b50746f8782788?src=pr) > plugman miss the last file/folder when installing plugin on windows > --- > > Key: CB-11730 > URL: https://issues.apache.org/jira/browse/CB-11730 > Project: Apache Cordova > Issue Type: Bug > Components: CordovaLib >Affects Versions: 6.3.1 > Environment: Windows > plugman --version > 1.2.1 > cordova --version > 6.3.1 >Reporter: Yasuharu Seki >Priority: Minor > Labels: triaged > > Steps to reproduce: > - Create simple plugin > $ plugman create --name SimplePlugin --plugin_id org.simple.plugin > --plugin_version 1.0.0 > - Create cordova project it includes the name of plugin > $ cordova create SimplePlugin_TestBed > - Install the plugin into the created project > $ cordova plugin add ../SimplePlugin > -> Check the plugins/org.simple.plugin folder > Find www/ folder is missing. > The reason is filenames.indexOf(relativeRootFolder) returns -1 when the > target folder name cannot find in the plugin folder. > The original code works good when the project is on the child folder. > [plugin]/[project of plugin_testbed] > But does not the project as sibling. > [plugin] > [project of plugin_testbed] -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-11730) plugman miss the last file/folder when installing plugin on windows
[ https://issues.apache.org/jira/browse/CB-11730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15574791#comment-15574791 ] ASF GitHub Bot commented on CB-11730: - Github user ahirun0426 commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/484#discussion_r83387722 --- Diff: cordova-lib/src/plugman/fetch.js --- @@ -330,7 +330,7 @@ function copyPlugin(pinfo, plugins_dir, link) { shell.rm('-rf', dest); -if(!link && dest.indexOf(path.resolve(plugin_dir)) === 0) { +if(!link && dest.indexOf(path.resolve(plugin_dir)+'\\') === 0) { --- End diff -- Thank you pointed out the problem! Yes, it should be invalid value for macs/unix. I should change it to node official separator expression. > plugman miss the last file/folder when installing plugin on windows > --- > > Key: CB-11730 > URL: https://issues.apache.org/jira/browse/CB-11730 > Project: Apache Cordova > Issue Type: Bug > Components: CordovaLib >Affects Versions: 6.3.1 > Environment: Windows > plugman --version > 1.2.1 > cordova --version > 6.3.1 >Reporter: Yasuharu Seki >Priority: Minor > Labels: triaged > > Steps to reproduce: > - Create simple plugin > $ plugman create --name SimplePlugin --plugin_id org.simple.plugin > --plugin_version 1.0.0 > - Create cordova project it includes the name of plugin > $ cordova create SimplePlugin_TestBed > - Install the plugin into the created project > $ cordova plugin add ../SimplePlugin > -> Check the plugins/org.simple.plugin folder > Find www/ folder is missing. > The reason is filenames.indexOf(relativeRootFolder) returns -1 when the > target folder name cannot find in the plugin folder. > The original code works good when the project is on the child folder. > [plugin]/[project of plugin_testbed] > But does not the project as sibling. > [plugin] > [project of plugin_testbed] -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-11730) plugman miss the last file/folder when installing plugin on windows
[ https://issues.apache.org/jira/browse/CB-11730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15430255#comment-15430255 ] ASF GitHub Bot commented on CB-11730: - GitHub user ahirun0426 opened a pull request: https://github.com/apache/cordova-lib/pull/484 [CB-11730] Modify condition of if clause to avoid similar project nam… …e with plugin name The original if clause accepts c:\work\SimplePlugin_TestBed with c:\work\SimplePlugin So I add \ to the plugin directory name for only enable the if clause to complete match the directory name. c:\work\SimplePlugin\ nodejs.org description explains the path.resolve removes trailing slashes, the code should work with the situation. https://nodejs.org/dist/latest-v6.x/docs/api/path.html#path_path_resolve_path 'The resulting path is normalized and trailing slashes are removed unless the path is resolved to the root directory.' You can merge this pull request into a Git repository by running: $ git pull https://github.com/ahirun0426/cordova-lib master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-lib/pull/484.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 #484 commit ea2759a477045238b34fcacee14fcc0e1aea6162 Author: ysekiDate: 2016-08-22T07:40:31Z [CB-11730] Modify condition of if clause to avoid similar project name with plugin name > plugman miss the last file/folder when installing plugin on windows > --- > > Key: CB-11730 > URL: https://issues.apache.org/jira/browse/CB-11730 > Project: Apache Cordova > Issue Type: Bug > Components: Plugman >Affects Versions: 6.0.0 > Environment: Windows > plugman --version > 1.2.1 > cordova --version > 6.3.1 >Reporter: Yasuharu Seki >Priority: Trivial > > Steps to reproduce: > - Create simple plugin > $ plugman create --name SimplePlugin --plugin_id org.simple.plugin > --plugin_version 1.0.0 > - Create cordova project it includes the name of plugin > $ cordova create SimplePlugin_TestBed > - Install the plugin into the created project > $ cordova plugin add ../SimplePlugin > -> Check the plugins/org.simple.plugin folder > Find www/ folder is missing. > The reason is filenames.indexOf(relativeRootFolder) returns -1 when the > target folder name cannot find in the plugin folder. > The original code works good when the project is on the child folder. > [plugin]/[project of plugin_testbed] > But does not the project as sibling. > [plugin] > [project of plugin_testbed] -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-11730) plugman miss the last file/folder when installing plugin on windows
[ https://issues.apache.org/jira/browse/CB-11730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15429996#comment-15429996 ] Yasuharu Seki commented on CB-11730: A quick solution would be here. plugman/fetch.js(347) filenames.splice(filenames.indexOf(relativeRootFolder),1); -> var index = filenames.indexOf(relativeRootFolder); if(0 < index){ filenames.splice(index,1); } But probably, make strict folder name match on if clause at (333) is better than the solution above. > plugman miss the last file/folder when installing plugin on windows > --- > > Key: CB-11730 > URL: https://issues.apache.org/jira/browse/CB-11730 > Project: Apache Cordova > Issue Type: Bug > Components: Plugman >Affects Versions: 6.0.0 > Environment: Windows > plugman --version > 1.2.1 > cordova --version > 6.3.1 >Reporter: Yasuharu Seki >Priority: Trivial > > Steps to reproduce: > - Create simple plugin > $ plugman create --name SimplePlugin --plugin_id org.simple.plugin > --plugin_version 1.0.0 > - Create cordova project it includes the name of plugin > $ cordova create SimplePlugin_TestBed > - Install the plugin into the created project > $ cordova plugin add ../SimplePlugin > -> Check the plugins/org.simple.plugin folder > Find www/ folder is missing. > The reason is filenames.indexOf(relativeRootFolder) returns -1 when the > target folder name cannot find in the plugin folder. > The original code works good when the project is on the child folder. > [plugin]/[project of plugin_testbed] > But does not the project as sibling. > [plugin] > [project of plugin_testbed] -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org