GithubHelp home page GithubHelp logo

don't hardcode paths for linux about gateway HOT 5 CLOSED

jackpal avatar jackpal commented on August 16, 2024
don't hardcode paths for linux

from gateway.

Comments (5)

jackpal avatar jackpal commented on August 16, 2024

The reason we use the Linux-standard hard-coded full paths is to avoid relying on $PATH, which could be missing or malformed or not include the route or ip commands.

Your suggestion roughly boils down to using PATH again, which is not what we want to do.

I would be willing to consider a patch that optionally used environment variables such as JACKPAL_GATEWAY_IP and JACKPAL_GATEWAY_ROUTE to let people override the default locations / program names.

from gateway.

yonderblue avatar yonderblue commented on August 16, 2024

👍 for some kind of solution to the hard coding.

Perhaps a good solution would be use the path, and if not found then use the hard coded? Or vice versa?

from gateway.

mjgarton avatar mjgarton commented on August 16, 2024

I've hit this problem too.

How about trying a hard coded list of paths? There are unlikely to be more than about 4 possibilities.

If this sounds okay, I'd be happy to make the change and submit a PR.

from gateway.

mjgarton avatar mjgarton commented on August 16, 2024

#14

from gateway.

jackpal avatar jackpal commented on August 16, 2024

Gave up on hard coding the paths to ip and bin.

from gateway.

Related Issues (14)

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.