-
Notifications
You must be signed in to change notification settings - Fork 276
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
Conversation
fdf20f5
to
0a585c2
Compare
There was a problem hiding this 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
super nit
// 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. |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit:
// 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.)
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit:
// Find the Go runtime and use it to build the credential helper. | |
// Find the Go runtime and use it to download the credential helper. |
There was a problem hiding this comment.
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 <[email protected]>
0a585c2
to
5c60812
Compare
No description provided.