Giter VIP home page Giter VIP logo

Comments (6)

sholladay avatar sholladay commented on July 25, 2024 1

Ah yes, you are right. The .env.example check is already loose enough and we can leave it as-is. Updated my comment to reflect that.

from envy.

Nargonath avatar Nargonath commented on July 25, 2024

It might be a bit trickier than the possible solution mentioned above. I just ran node -e "console.log(process.platform);" in my bash terminal and I get back linux. I'm not sure we have a way of noticing we are running on WSL platform. Another solution I thought of could be to add an object parameter as a second argument with property { wsl: true } so we could change our handling of the permission. The parameter would default to false and not be required so we wouldn't break other people install. What do you think?

from envy.

sholladay avatar sholladay commented on July 25, 2024

Thankfully, it is possible to detect WSL:
https://github.com/sindresorhus/is-wsl

The code here needs to assert that the file permissions are 666 when isWsl || prcoess.platform === 'win32, otherwise keep the existing behavior.

I'll want to set up AppVeyor and tests for this as well.

from envy.

Nargonath avatar Nargonath commented on July 25, 2024

Alright! Sindre to the rescue! I looked up on Google but couldn't find information about how to detect it. Thanks for the help. I don't think I can make a PR before this weekend, if I have the time I will otherwise I'll do it this weekend.

from envy.

Nargonath avatar Nargonath commented on July 25, 2024

By the way only the check on hidden .env file is problematic on Windows as you can pass the first test if you put 666 as your file permission. Do you still want to change it or shall I keep it as is?

from envy.

Nargonath avatar Nargonath commented on July 25, 2024

I made a mistake when I explained the issue. On windows I can only make 777, 555 or 000 permission. I guess this is fine if I require the file to 555 instead of 666. Users would just have to modify the file as Administrator.

from envy.

Related Issues (5)

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.