You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Vladimir Kotikov (JIRA)" <ji...@apache.org> on 2015/01/14 13:04:35 UTC

[jira] [Comment Edited] (CB-8216) Adding plugins by relative path fails when CWD is not the project root

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

Vladimir Kotikov edited comment on CB-8216 at 1/14/15 12:03 PM:
----------------------------------------------------------------

Looks like that this is medic specific and I’m doubt if we’ll experience this issue anywhere else. 

More technical details below: 
Repro steps:
1.	Cd to mobilespec’s parent folder
2.	Set PWD to current directory
3.	Run createmobilespec with following command:
cordova-mobile-spec\createmobilespec\createmobilespec --android --skiplink --debug mobilespec

Explanation:
Initially on Windows  PWD is not being set implicitly for each process (that’s why we were not able to catch this error while running createmobilespec from console) and in this case cli works fine.
But buildbot ShellCommand explicitly sets PWD for spawned process (apparently for emulating NIX environment), and in case of Medic it will be set to project’s root parent directory. This coincidence causes plugman to fail resolve plugin location properly.



was (Author: vladimir.kotikov):
Looks like that this is medic specific and I’m doubt if we’ll experience this issue anywhere else. So since the fix to mobilespec already pushed to master, I propose to close original issue.

More technical details below: 
Repro steps:
1.	Cd to mobilespec’s parent folder
2.	Set PWD to current directory
3.	Run createmobilespec with following command:
cordova-mobile-spec\createmobilespec\createmobilespec --android --skiplink --debug mobilespec

Explanation:
Initially on Windows  PWD is not being set implicitly for each process (that’s why we were not able to catch this error while running createmobilespec from console) and in this case cli works fine.
But buildbot ShellCommand explicitly sets PWD for spawned process (apparently for emulating NIX environment), and in case of Medic it will be set to project’s root parent directory. This coincidence causes plugman to fail resolve plugin location properly.


> Adding plugins by relative path fails when CWD is not the project root
> ----------------------------------------------------------------------
>
>                 Key: CB-8216
>                 URL: https://issues.apache.org/jira/browse/CB-8216
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CordovaLib
>            Reporter: Andrew Grieve
>            Assignee: Sergey Grebnov
>            Priority: Minor
>
> e.g. cd into the platforms directory, then "cordova plugin add ../../../cordova-plugin-file". It'll try to get it from the registry then fail. The issue is that we chdir() into the project root before the call to add the plugin.



--
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