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

feat: download binaries for cred helpers #795

Merged
merged 1 commit into from
Aug 15, 2024

Conversation

thedadams
Copy link
Contributor

No description provided.

Copy link
Member

@g-linville g-linville left a comment

Choose a reason for hiding this comment

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

Just comments changes

pkg/repos/get.go Outdated
if helperName == "wincred" {
suffix = ".exe"
}

// The file helper is built-in and does not need to be compiled.
Copy link
Member

Choose a reason for hiding this comment

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

super nit

Suggested change
// The file helper is built-in and does not need to be compiled.
// The file helper is built-in and does not need to be downloaded.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

pkg/repos/get.go Outdated
return err
}
} else if err != nil {
return err
}

if !needsBuild {
if !needsDownloaded {
// Check for the existence of the gptscript-credential-osxkeychain binary.
Copy link
Member

Choose a reason for hiding this comment

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

nit:

Suggested change
// Check for the existence of the gptscript-credential-osxkeychain binary.
// Check for the existence of the credential helper binary.

(I should have fixed this myself before but evidently missed it.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

// Check for the existence of the gptscript-credential-osxkeychain binary.
// If it's there, we have no need to build it and can just return.
if _, err := os.Stat(filepath.Join(m.credHelperDirs.BinDir, "gptscript-credential-"+helperName+suffix)); err == nil {
if _, err = os.Stat(filepath.Join(m.credHelperDirs.BinDir, "gptscript-credential-"+helperName+suffix)); err == nil {
return nil
}
}

// Find the Go runtime and use it to build the credential helper.
Copy link
Member

Choose a reason for hiding this comment

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

nit:

Suggested change
// Find the Go runtime and use it to build the credential helper.
// Find the Go runtime and use it to download the credential helper.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Signed-off-by: Donnie Adams <donnie@acorn.io>
@thedadams thedadams merged commit 2e880ed into gptscript-ai:main Aug 15, 2024
10 checks passed
@thedadams thedadams deleted the cred-helper-releases branch August 15, 2024 00:40
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.

4 participants