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

Configuration fails if git is not on path #632

Closed
isc-tleavitt opened this issue Nov 8, 2024 · 1 comment · Fixed by #633
Closed

Configuration fails if git is not on path #632

isc-tleavitt opened this issue Nov 8, 2024 · 1 comment · Fixed by #633
Assignees
Labels
bug Something isn't working customer Based on customer feedback (as opposed to something identified by developers)

Comments

@isc-tleavitt
Copy link
Collaborator

Error log:

NAMESPACE>do ##class(SourceControl.Git.API).Configure()
Configured SourceControl.Git.Extension as source control class for namespace CPM
Configured default mappings for classes, routines, and include files. You can cu
stomize these in the global:
     ^SYS("SourceControl","Git","settings","mappings")
WARNING: You are using an older version of git which is not compatible with git-
source-control. Please upgrade to git version 2.31.0 or greater to continue
Cancelling git-source-control configuration...

Intuitively I think the issue is:

        set gitExists = ##class(SourceControl.Git.Utils).GitBinExists(.version) // version is "", gitExists = 0
        set gitBinPath = ##class(SourceControl.Git.Utils).GitBinPath(.isDefault)

        // Make sure they are using an appropriate git version
        if (+$PIECE(version,"version ",2))<2.31 { //0 < 2.31
            write !!, "WARNING: You are using an older version of git which is not compatible with git-source-control. Please upgrade to git version 2.31.0 or greater to continue"
            write !!, "Cancelling git-source-control configuration..."
            quit
        }

We shouldn't do the version check if gitExists is false.

@isc-tleavitt isc-tleavitt added bug Something isn't working customer Based on customer feedback (as opposed to something identified by developers) labels Nov 8, 2024
@isc-tleavitt isc-tleavitt added this to the Q3/Q4 2024 Targets milestone Nov 8, 2024
@isc-tleavitt
Copy link
Collaborator Author

Simple solution (worked on customer call) is:
if (+$PIECE(version,"version ",2))<2.31 && gitExists {

But this is still kind of silly - it would be better to repeat the version check after configuration and cancel configuration if things are still going to be broken.

@isc-etamarch isc-etamarch self-assigned this Nov 8, 2024
@isc-etamarch isc-etamarch linked a pull request Nov 8, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working customer Based on customer feedback (as opposed to something identified by developers)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants