ucb-bar / chipyard

An Agile RISC-V SoC Design Framework with in-order cores, out-of-order cores, accelerators, and more
https://chipyard.readthedocs.io/en/stable/
BSD 3-Clause "New" or "Revised" License
1.57k stars 620 forks source link

build-setup.sh $(which conda) returns function #2002

Open allpan3 opened 1 month ago

allpan3 commented 1 month ago

Background Work

Chipyard Version and Hash

Release: 1.12.2 Hash: dccedae00f4dd626425f8f89c93f55ee11e4193e

OS Setup

lsb_release -a LSB Version: :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch Distributor ID: Rocky Description: Rocky Linux release 8.8 (Green Obsidian) Release: 8.8 Codename: GreenObsidian

Other Setup

Ex: Prior steps taken / Documentation Followed / etc...

Current Behavior

which conda outputs the function instead of executable path because function names take precedence.

$ which conda
conda ()
{
    \local cmd="${1-__missing__}";
    case "$cmd" in
        activate | deactivate)
            __conda_activate "$@"
        ;;
        install | update | upgrade | remove | uninstall)
            __conda_exe "$@" || \return;
            __conda_reactivate
        ;;
        *)
            __conda_exe "$@"
        ;;
    esac
}

Expected Behavior

This may be specific to my OS environment, but would suggest a more compatible way to get the executable path, like type -P conda.

Other Information

No response

alsrbok commented 2 weeks ago

I just removed that which conda option. You can check my recent question.