cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vladimir-kotikov <...@git.apache.org>
Subject [GitHub] cordova-lib pull request: CB-11174 Resolve symlinked path before g...
Date Fri, 29 Apr 2016 22:55:55 GMT
Github user vladimir-kotikov commented on a diff in the pull request:

    https://github.com/apache/cordova-lib/pull/433#discussion_r61655336
  
    --- Diff: cordova-lib/spec-cordova/platforms/platforms.spec.js ---
    @@ -17,19 +17,25 @@
         under the License.
     */
     
    +var fs = require('fs');
    +var os = require('os');
     var path = require('path');
     var rewire = require('rewire');
    +var shell = require('shelljs');
     
     var util = require('../../src/cordova/util');
     var platforms = rewire('../../src/platforms/platforms');
     
     var CORDOVA_ROOT = path.join(__dirname, '../fixtures/projects/platformApi');
     var PLATFORM_WITH_API = path.join(CORDOVA_ROOT, 'platforms/windows');
     var PLATFORM_WOUT_API = path.join(CORDOVA_ROOT, 'platforms/android');
    +var PLATFORM_SYMLINK = path.join(os.tmpdir(), 'cordova_windows_symlink');
     
    -var MockPlatformApi = require(path.join(PLATFORM_WITH_API, 'cordova', 'Api'));
    +var MockPlatformApi = require(fs.realpathSync(path.join(PLATFORM_WITH_API, 'cordova/Api.js')));
     var PlatformApiPoly = require('../../src/platforms/PlatformApiPoly');
     
    +shell.ln('-sf', PLATFORM_WITH_API, PLATFORM_SYMLINK);
    +
    --- End diff --
    
    I've tested this on both OS X and Windows. Tests are passing in both cases.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


Mime
View raw message