Where is the `sdk` command installed for sdkman

冷暖自知 提交于 2019-12-01 23:17:40

OK. So I found it out. As @that-other-guy mentioned in the comment above, I used type -a instead of which, which showed me that it was a function defined.

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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!