Git Product home page Git Product logo

Comments (10)

hellt avatar hellt commented on May 20, 2024 1

This is a never-ending battle between better installation UX and security practices.

I think for people who don't have sudo rights it is fair to assume that they can run smth like

echo 'export PATH=$PATH:~/.local/bin' >> ~/.bashrc
source ~/.bashrc

from sshx.

mriemensberger avatar mriemensberger commented on May 20, 2024 1

Ugly but does the job:

curl -sSf https://sshx.io/get | sed -e 's:\bsudo\b ::g' -e 's:/usr/local/bin\b:$HOME/.local/bin:g' | sh

from sshx.

ekzhang avatar ekzhang commented on May 20, 2024 1

This is too complicated! I'm not interested in it unfortunately. I've used a lot of developer automation in the past and this is really too much to set up right now

I'm going to close this issue because it's getting off-topic, please open a different issue if needed.

The install script will be changed at some point, right now is a stopgap.

from sshx.

ekzhang avatar ekzhang commented on May 20, 2024

That's fine! Unfortunately ~/.local/bin isn't on $PATH on most systems. I'm not really sure what to do about this. Any suggestions?

from sshx.

YouJiacheng avatar YouJiacheng commented on May 20, 2024

add an alias?

from sshx.

hexbinoct avatar hexbinoct commented on May 20, 2024

maybe a few questions to be asked as part of installation and in the end make up the appropriate script based on those answers and execute.

from sshx.

ekzhang avatar ekzhang commented on May 20, 2024

Thanks. I'm not super happy with modifying the user's shell profile either, since that changes their system in ways that they need to understand. It also makes the installation script significantly more complex because it needs to detect the difference between different shells.

The same can be said about interactive prompts -- nice in theory, but they add a lot of complexity to the installation script. I care about the script being short and simple so that users can actually audit it.

Moving to /usr/local/bin is likely the best approach for now, unfortunately. I would be open to adding a simple flag that downloads to the local directory instead though, so it doesn't require root.

from sshx.

pomdtr avatar pomdtr commented on May 20, 2024

What about just adding an optional arg (env var would also work) ?

curl -sSf https://sshx.io/get | sh -- ~/.local/bin

Btw, did you consider using cargo-dist for distributing your binary ?

from sshx.

ekzhang avatar ekzhang commented on May 20, 2024

Yeah, optional arg would be great, though probably would want to make it an actual argument like --path ~/.local/bin. I'll try to implement it in the future.

I don't want to have people use cargo dist because cargo dist itself requires a curl | sh script, and that adds a lot of complexity! I think the main options are system package managers or simple binary downloads with checksum.

from sshx.

pomdtr avatar pomdtr commented on May 20, 2024

I don't want to have people use cargo dist because cargo dist itself requires a curl | sh script, and that adds a lot of complexity! I think the main options are system package managers or simple binary downloads with checksum.

How is it different from the current install method ?

Cargo-dist is only a solution for the maintainer, users don't have to use it (they install the package using a shell scripts, their package manager, or even just download an archive from github). See https://github.com/axodotdev/oranda/releases/tag/v0.5.0

from sshx.

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.