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

#47 🥅 catch pyenv vs. system python configuration mismatch #48

Merged
merged 1 commit into from
Sep 7, 2023

Conversation

d-ryan-ashcraft
Copy link
Contributor

No description provided.

@d-ryan-ashcraft d-ryan-ashcraft added this to the 2.7.1 milestone Sep 7, 2023
@@ -139,7 +139,7 @@ public void execute() throws MojoExecutionException, MojoFailureException {
}

if (!missingRequiredToolMsgs.isEmpty()) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I (Informational): just making it easier to read the error

@@ -191,6 +191,17 @@ private String validatateAndConfigurePyenv(List<String> missingRequiredToolMsgs,
currentPythonVersion = pyenvHelper.getCurrentPythonVersion();
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I: this is the meat of the change - when pyenv isn't configured correctly but we have configured habushu to use it, pyenv says your python version is one thing, but python calls on the path say another.

@@ -21,17 +22,17 @@ public class PythonVersionHelper {

private static final String PYTHON_COMMAND = "python";
private static final String PYTHON_3_COMMAND = "python3";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I: some minor sonarlint tidying while I was here - this class is easier to review if you hide whitespace

}

/**
* Executes a python command with the given arguments, logs the executed
* command, and returns the resultant process output as a string.
* at DEBUG level, and returns the resultant process output as a string.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I: creature comfort so we just have less output since this now runs every time we get the pyenv version

@d-ryan-ashcraft d-ryan-ashcraft requested a review from a team September 7, 2023 15:37
@d-ryan-ashcraft d-ryan-ashcraft force-pushed the 47-pyenv-misconfiguration-check branch from fbb23fd to 7c38b53 Compare September 7, 2023 15:41
@d-ryan-ashcraft d-ryan-ashcraft force-pushed the 47-pyenv-misconfiguration-check branch from 7c38b53 to e9cb6eb Compare September 7, 2023 16:25
@d-ryan-ashcraft d-ryan-ashcraft merged commit be6a7cc into dev Sep 7, 2023
@d-ryan-ashcraft d-ryan-ashcraft deleted the 47-pyenv-misconfiguration-check branch September 7, 2023 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants