Return-Path: X-Original-To: apmail-cordova-issues-archive@minotaur.apache.org Delivered-To: apmail-cordova-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7B07F102F3 for ; Thu, 24 Oct 2013 06:12:08 +0000 (UTC) Received: (qmail 36948 invoked by uid 500); 24 Oct 2013 06:12:06 -0000 Delivered-To: apmail-cordova-issues-archive@cordova.apache.org Received: (qmail 36856 invoked by uid 500); 24 Oct 2013 06:12:05 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 36803 invoked by uid 99); 24 Oct 2013 06:12:01 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Oct 2013 06:12:01 +0000 Date: Thu, 24 Oct 2013 06:12:01 +0000 (UTC) From: "Sergey Grebnov (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CB-5192) Plugman engine check fails on Windows MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CB-5192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13803889#comment-13803889 ] Sergey Grebnov commented on CB-5192: ------------------------------------ Proposed solution 1. remove .bat extension from other script locations to be consistent - see cordova-wp8 above as an example, 2. Remove check for the file location on Windows before executing script since .exec or .spawn cmd /c will be able to run it just fine if(fs.existsSync(engine.scriptSrc)){ fs.chmodSync(engine.scriptSrc, '755'); var d = Q.defer(); child_process.exec(engine.scriptSrc, function(error, stdout, stderr) { > Plugman engine check fails on Windows > ------------------------------------- > > Key: CB-5192 > URL: https://issues.apache.org/jira/browse/CB-5192 > Project: Apache Cordova > Issue Type: Bug > Components: Plugman > Environment: Windows > Reporter: Sergey Grebnov > > Right now the simplest (and also the most correct IMO) way to specify plugin restrictions to specific cordova version is the following: > plugin.xml: > > > > But in this case as per plugman current implementation and engines definition(plugman/src/util/default-engines.js) plugman won't be able to resove script because on Windows the script named 'version.bat', not just 'version'. > module.exports = function(project_dir){ > return { > 'cordova': > { 'platform':'*', 'scriptSrc': path.join(project_dir,'cordova','version') }, <- works in general, but NOT for WP7/8 > ... > 'cordova-wp8': > { 'platform':'wp8', 'scriptSrc': path.join(project_dir,'cordova','version.bat') }, <- correct location, not used in case of example above > child_process.exec should correctly resolve this case (missing cmd file extension) but plugman check for file location so it fails to find it. > This should affect all platforms which are supported on Windows and use .bat files (WP7/8, BlackBerry, Android) -- This message was sent by Atlassian JIRA (v6.1#6144)