1
0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-12-12 19:18:28 +02: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"