1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-11-16 17:50:09 +00:00

Mute errors when asking for java version

This commit is contained in:
Dominik Ritter 2018-06-17 22:47:43 +02:00
parent b7681a00ca
commit d09a46f9e0

View file

@ -1707,7 +1707,7 @@ prompt_dropbox() {
# print Java version number
prompt_java_version() {
local java_version
java_version=$(java -fullversion 2>&1 | cut -d '"' -f 2)
java_version=$(java -fullversion 2>/dev/null | cut -d '"' -f 2)
if [[ -n "$java_version" ]]; then
"$1_prompt_segment" "$0" "$2" "red" "white" "$java_version" "JAVA_ICON"