You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2020/06/24 17:36:30 UTC

[GitHub] [cordova-mobile-spec] brodybits opened a new pull request #208: use relative path for template, to avoid git failure

brodybits opened a new pull request #208:
URL: https://github.com/apache/cordova-mobile-spec/pull/208


   <!--
   Please make sure the checklist boxes are all checked before submitting the PR. The checklist is intended as a quick reference, for complete details please see our Contributor Guidelines:
   
   http://cordova.apache.org/contribute/contribute_guidelines.html
   
   Thanks!
   -->
   
   Resolves #207
   
   ### Platforms affected
   
   all
   
   ### Motivation and Context
   <!-- Why is this change required? What problem does it solve? -->
   <!-- If it fixes an open issue, please link to the issue here. -->
   
   issue #207
   
   ### Description
   <!-- Describe your changes in detail -->
   
   use relative path for template to avoid the git failure reported in issue #207
   
   I suspect that the git failure is due to a change in the way that Cordova CLI works together with npm.
   
   ### Testing
   <!-- Please describe in detail how you tested your changes. -->
   
   The following command succeeds with the proposed change on my macOS Catalina system:
   
   ```sh
   ./cordova-mobile-spec/createmobilespec/createmobilespec.js --android --debug
   ```
   
   ### Checklist
   
   - [ ] I've run the tests to see all new and existing tests pass
   - ~~I added automated test coverage as appropriate for this change~~
   - ~~Commit is prefixed with `(platform)` if this change only applies to one platform (e.g. `(android)`)~~
   - [x] If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct [keyword to close issues using keywords](https://help.github.com/articles/closing-issues-using-keywords/))
   - ~~I've updated the documentation if necessary~~


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [cordova-mobile-spec] raphinesse commented on a change in pull request #208: [WIP] use relative path for template, to avoid git failure

Posted by GitBox <gi...@apache.org>.
raphinesse commented on a change in pull request #208:
URL: https://github.com/apache/cordova-mobile-spec/pull/208#discussion_r445389302



##########
File path: createmobilespec/createmobilespec.js
##########
@@ -420,7 +420,7 @@ if (argv.plugman) {
     // Create the project using "cordova create"
     myDelete(cli_project_dir);
     console.log("### Creating project mobilespec...");
-    executeShellCommand(cli + " create " + projectDirName + " org.apache.cordova.mobilespec MobileSpec_Tests --template cordova-mobile-spec" + path.sep + "www");
+    executeShellCommand(cli + " create " + projectDirName + " org.apache.cordova.mobilespec MobileSpec_Tests --template ./cordova-mobile-spec" + path.sep + "www");

Review comment:
       This error message is from cordova-create. With the latest bunch of breaking changes there, we removed support for plain `www` dirs as templates. I did not take a closer look at the code here, but a simple fix could be creating a project with the default template and replacing the www dir afterwards.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [cordova-mobile-spec] brodybits commented on a change in pull request #208: use relative path for template, to avoid git failure

Posted by GitBox <gi...@apache.org>.
brodybits commented on a change in pull request #208:
URL: https://github.com/apache/cordova-mobile-spec/pull/208#discussion_r445063670



##########
File path: createmobilespec/createmobilespec.js
##########
@@ -420,7 +420,7 @@ if (argv.plugman) {
     // Create the project using "cordova create"
     myDelete(cli_project_dir);
     console.log("### Creating project mobilespec...");
-    executeShellCommand(cli + " create " + projectDirName + " org.apache.cordova.mobilespec MobileSpec_Tests --template cordova-mobile-spec" + path.sep + "www");
+    executeShellCommand(cli + " create " + projectDirName + " org.apache.cordova.mobilespec MobileSpec_Tests --template ./cordova-mobile-spec" + path.sep + "www");

Review comment:
       or better yet:
   
   ```suggestion
       executeShellCommand(cli + ` create ${projectDirName} org.apache.cordova.mobilespec MobileSpec_Tests --template ${path.join('.', 'cordova-mobile-spec', 'www')}`);
   ```
   
   (not yet tested, should be considered a major change)




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [cordova-mobile-spec] brodybits commented on a change in pull request #208: use relative path for template, to avoid git failure

Posted by GitBox <gi...@apache.org>.
brodybits commented on a change in pull request #208:
URL: https://github.com/apache/cordova-mobile-spec/pull/208#discussion_r445060957



##########
File path: createmobilespec/createmobilespec.js
##########
@@ -420,7 +420,7 @@ if (argv.plugman) {
     // Create the project using "cordova create"
     myDelete(cli_project_dir);
     console.log("### Creating project mobilespec...");
-    executeShellCommand(cli + " create " + projectDirName + " org.apache.cordova.mobilespec MobileSpec_Tests --template cordova-mobile-spec" + path.sep + "www");
+    executeShellCommand(cli + " create " + projectDirName + " org.apache.cordova.mobilespec MobileSpec_Tests --template ./cordova-mobile-spec" + path.sep + "www");

Review comment:
       ```suggestion
       executeShellCommand(cli + " create " + projectDirName + " org.apache.cordova.mobilespec MobileSpec_Tests --template ." + path.sep + "cordova-mobile-spec" + path.sep + "www");
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [cordova-mobile-spec] brodybits commented on a change in pull request #208: use relative path for template, to avoid git failure

Posted by GitBox <gi...@apache.org>.
brodybits commented on a change in pull request #208:
URL: https://github.com/apache/cordova-mobile-spec/pull/208#discussion_r445085667



##########
File path: createmobilespec/createmobilespec.js
##########
@@ -420,7 +420,7 @@ if (argv.plugman) {
     // Create the project using "cordova create"
     myDelete(cli_project_dir);
     console.log("### Creating project mobilespec...");
-    executeShellCommand(cli + " create " + projectDirName + " org.apache.cordova.mobilespec MobileSpec_Tests --template cordova-mobile-spec" + path.sep + "www");
+    executeShellCommand(cli + " create " + projectDirName + " org.apache.cordova.mobilespec MobileSpec_Tests --template ./cordova-mobile-spec" + path.sep + "www");

Review comment:
       It does not work - `./cordova-mobile-spec/createmobilespec/createmobilespec.js --android` ends with the following non-descriptive output:
   
   ```
   ### Creating project mobilespec...
   $ /Users/brodybits/dev/cordova-test/cordova/cordova-cli/bin/cordova create mobilespec org.apache.cordova.mobilespec MobileSpec_Tests --template ./cordova-mobile-spec/www
   Warning: using prerelease version 10.0.0-dev (cordova-lib@10.0.0-dev)
   Creating a new cordova project.
   /Users/brodybits/dev/cordova-test/cordova/cordova-mobile-spec/www is not a valid template
   ```
   
   Unfortunately I did not see the error message before I raised this PR.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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