Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix package maven #1320

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

merikan
Copy link
Contributor

@merikan merikan commented Jan 17, 2023

Description

The package maven module didn't handle non-parseable XML file (pom.xml). This could happen e.g. if you are in a middle of a merge-conflict. The maven command prints errors to stdout so we have to check the exit code.

When fixing non-parseable pom I discovered that we didn't handle the lookup for maven exe correctly so I fixed that too.

Added tests for package_maven.

Screenshot

@netlify
Copy link

netlify bot commented Jan 17, 2023

Deploy Preview for spaceship-prompt ready!

Name Link
🔨 Latest commit c14d732
🔍 Latest deploy log https://app.netlify.com/sites/spaceship-prompt/deploys/63c927e70d7adf00087f7a4e
😎 Deploy Preview https://deploy-preview-1320--spaceship-prompt.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

local maven_exe=$(spaceship::upsearch mvnw) || (spaceship::exists mvn && maven_exe="mvn") || return

$maven_exe help:evaluate -q -DforceStdout -D"expression=project.version" 2>/dev/null
local maven_exe=$(spaceship::upsearch mvnw || (spaceship::exists mvn && echo "mvn")) || return
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a very complex line. Can we simplify that with a multi-line if-else?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @denysdovhan I totally missed this. Sure, I can clean things up. 👍

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a problem. Waiting for your changes.

@denysdovhan denysdovhan added bug Bug related to code base, behavior, displaying, etc. improvement A PR that make small changes for improving UX, performance, readability, etc labels Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug related to code base, behavior, displaying, etc. improvement A PR that make small changes for improving UX, performance, readability, etc
Development

Successfully merging this pull request may close these issues.

None yet

2 participants