Skip to content

Commit

Permalink
fix: fix maven section bug (#960)
Browse files Browse the repository at this point in the history
  • Loading branch information
Runrioter committed Jun 9, 2021
1 parent 9a63b78 commit 1c8348d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
release:
name: Release
needs: main
if: ${{ github.repository == 'spaceship-prompt/spaceship-prompt' && github.event_name == 'push'}}
if: ${{ github.repository == 'spaceship-prompt/spaceship-prompt' && github.event_name == 'push' }}
runs-on: ubuntu-latest
steps:
- name: 🛑 Cancel Previous Runs
Expand Down
2 changes: 1 addition & 1 deletion sections/maven.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ spaceship::maven::find_maven_wrapper() {
spaceship::maven::versions() {
local maven_exe="$1" maven_version_output maven_version jvm_version

maven_version_output=$("$maven_exe" --version)
maven_version_output=$("$maven_exe" --version 2>/dev/null)
maven_version=$(echo "$maven_version_output" | awk '{ if ($2 ~ /^Maven/) { print "v" $3 } }')
jvm_version=$(echo "$maven_version_output" | awk '{ if ($1 ~ /^Java/) { print "v" substr($3, 1, length($3)-1) } }')

Expand Down

0 comments on commit 1c8348d

Please sign in to comment.