Where is the `sdk` command installed for sdkman

后端 未结 2 1694
遥遥无期
遥遥无期 2021-01-13 13:38

I just installed sdkman for installing grails on my machine (MacOS). When I run which sdk command I don\'t get any output. But when I run the sdk help

2条回答
  •  遥遥无期
    2021-01-13 14:17

    As you mentioned correctly "sdk" is not a command, its a declared function created by sdkman-main.sh (in ~/.sdkman/src) once called from ~/.sdkman/bin/sdkman-init.sh

    This is the reason why the installation page of sdkman asks for appending the following steps in the .bash_profile which declares this function each time the bash profile is loaded :

    #THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!

    [[ -s "/home/dudette/.sdkman/bin/sdkman-init.sh" ]] && source "/home/dudette/.sdkman/bin/sdkman-init.sh"

    This is also the reason "which" command doesn't pick it up as it checks for the installed commands on the linux PATH

提交回复
热议问题