GithubHelp home page GithubHelp logo

Comments (4)

Colonial-Dev avatar Colonial-Dev commented on July 17, 2024 1

Oh, this script is from cargo-dist, not you guys - was wondering why I couldn't find it in the repo... I'll drop them an issue.

from atuin.

ellie avatar ellie commented on July 17, 2024 1

Thanks for reaching out to cargo-dist! I'll close this one as it seems like they're on it, happy to reopen if that's not the case. Our install script wraps the cargo-dist one to do a few extra things, so we could potentially add something there too.

from atuin.

Colonial-Dev avatar Colonial-Dev commented on July 17, 2024

It looks like this particular snippet is the problem:

# Find the first file in the array that exists and choose
# that as our target to write to
for _rcfile_relative in $_rcfiles; do
    _home="$(print_home_for_script "$_rcfile_relative")"
    local _rcfile="$_home/$_rcfile_relative"

    if [ -f "$_rcfile" ]; then
        _target="$_rcfile"
        break
    fi
done

The rcfile candidates are .bash_profile .bash_login .bashrc, which means .bash_profile is picked first and the others are simply ignored.

For what it's worth, I checked the way rustup does it, and they opt to inject the sourcing into both files.

add_install_dir_to_path execution with -x/trace on + add_install_dir_to_path '$HOME/.atuin/bin' /var/home/colonial/.atuin/bin/env '$HOME/.atuin/bin/env' '.bash_profile .bash_login .bashrc' sh + local '_install_dir_expr=$HOME/.atuin/bin' + local _env_script_path=/var/home/colonial/.atuin/bin/env + local '_env_script_path_expr=$HOME/.atuin/bin/env' + local '_rcfiles=.bash_profile .bash_login .bashrc' + local _shell=sh + '[' -n /var/home/colonial ']' + local _target + local _home + for _rcfile_relative in $_rcfiles ++ print_home_for_script .bash_profile ++ local script=.bash_profile ++ local _home ++ case "$script" in ++ _home=/var/home/colonial ++ echo /var/home/colonial + _home=/var/home/colonial + local _rcfile=/var/home/colonial/.bash_profile + '[' -f /var/home/colonial/.bash_profile ']' + _target=/var/home/colonial/.bash_profile + break + '[' -z /var/home/colonial/.bash_profile ']' + local '_robust_line=. "$HOME/.atuin/bin/env"' + local '_pretty_line=source "$HOME/.atuin/bin/env"' + '[' '!' -f /var/home/colonial/.atuin/bin/env ']' + say_verbose '/var/home/colonial/.atuin/bin/env already exists' + '[' 1 = 0 ']' + grep -F '. "$HOME/.atuin/bin/env"' /var/home/colonial/.bash_profile + grep -F 'source "$HOME/.atuin/bin/env"' /var/home/colonial/.bash_profile + '[' -f /var/home/colonial/.atuin/bin/env ']' + local _line + '[' sh = fish ']' + _line='. "$HOME/.atuin/bin/env"' + say_verbose 'adding . "$HOME/.atuin/bin/env" to /var/home/colonial/.bash_profile' + '[' 1 = 0 ']' + ensure echo '' + echo '' + ensure echo '. "$HOME/.atuin/bin/env"' + echo '. "$HOME/.atuin/bin/env"' + return 1

from atuin.

Colonial-Dev avatar Colonial-Dev commented on July 17, 2024

Further testing:

  • AlmaLinux 9 (RHEL compatible, recent install for a cPanel server): same issue
  • Fedora Toolbox container: same issue
  • Debian container: works fine

Perhaps something upstream in the RPM family is to blame...

from atuin.

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.