GithubHelp home page GithubHelp logo

Comments (5)

mkhl avatar mkhl commented on July 20, 2024

I’m still not sure why realpath is required. I haven’t felt the need to symlink test/run anywhere yet…

from faucet-pipeline-core.

FND avatar FND commented on July 20, 2024

I've become profoundly uncomfortable not ensuring absolute paths in cases like this:
https://github.com/faucet-pipeline/faucet-pipeline-js/blob/99c67e5dc3dcb82caf7d3245b4d7560417f8df25/test/cli/run#L5-L6

Is that excessively paranoid?

from faucet-pipeline-core.

mkhl avatar mkhl commented on July 20, 2024

I believe it is.

Let’s assume we omit the call to realpath. In order for that to cause problems, someone would have to first symlink the script somewhere and then run it manually (npm test would still run it at the correct path). I believe that a failing script is the appropriate response to that scenario.

If someone were to actually do that, what problems would arise? Loading cli-harness.sh would fail and the script would abort with a helpful error message. If someone were to fix that error by fixing the path, the next begin would fail instead, again with a helpful error message.

I don’t think I’d do anything to prevent those errors, I’d much rather ensure that npm i && npm t works on a clean clone.

from faucet-pipeline-core.

mkhl avatar mkhl commented on July 20, 2024

Oh, as a side note: I think I’d also symlink cli-harness.sh into the directories where it’s loaded in order to present a simpler environment to the test scripts.

from faucet-pipeline-core.

FND avatar FND commented on July 20, 2024

Done: faucet-pipeline/faucet-pipeline-js@9c80dbb (with similar commits in faucet-core, faucet-sass, faucet-static, faucet-images and nite-owl)

from faucet-pipeline-core.

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.