Git Product home page Git Product logo

Comments (4)

rwjblue avatar rwjblue commented on August 25, 2024

Lets break apart that line a bit, and update your local copy with the snippet below, then tell me what the console output values are..

  doesFileExistIsCurrentProjectAddonModule: function(_relativePath) {
    console.log('_relativePath', _relativePath);
    var relativePathWithoutProjectNamePrefix = relativePath.replace(path.join('modules', this.project.pkg.name), '');
    console.log('relativePathWithoutProjectNamePrefix', relativePathWithoutProjectNamePrefix);

    var relativePath = path.join('addon', relativePathWithoutProjectNamePrefix);
    console.log('relativePath', relativePath);

    if (this._existsSync(relativePath)) {
      return true;
    }

    return this._doesTemplateFileExist(relativePath);
  },

I suspect, that we actually should be doing the following to cleanup/sanitize using / before checking _existsSync:

    var relativePathWithoutProjectNamePrefix = relativePath.replace('modules' + '/' +  this.project.pkg.name, '');

    var relativePath = 'addon/' + relativePathWithoutProjectNamePrefix;
    console.log('relativePath', relativePath);

from ember-cli-code-coverage.

nfc036 avatar nfc036 commented on August 25, 2024

Hi Robert, thanks for looking into this. Here the output for one file:

_relativePath modules/lib-ember-addon/transforms/tstamp.js
relativePathWithoutProjectNamePrefix modules/lib-ember-addon/transforms/tstamp.js
relativePath addon\modules\lib-ember-addon\transforms\tstamp.js

from ember-cli-code-coverage.

nfc036 avatar nfc036 commented on August 25, 2024

Indeed, your second code snippet fixes the problem.

from ember-cli-code-coverage.

rwjblue avatar rwjblue commented on August 25, 2024

Submitted #49 to fix.

from ember-cli-code-coverage.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.