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

fs.AnyVersion: Introduce ExactBinPath #40

Merged
merged 2 commits into from
Nov 30, 2021
Merged

fs.AnyVersion: Introduce ExactBinPath #40

merged 2 commits into from
Nov 30, 2021

Conversation

radeksimko
Copy link
Member

Closes #39

@radeksimko radeksimko added the enhancement New feature or request label Nov 22, 2021
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

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

Looks good to me 🚀

fs/any_version.go Outdated Show resolved Hide resolved
Co-authored-by: Brian Flad <bflad417@gmail.com>
@radeksimko radeksimko merged commit 6c4cca6 into main Nov 30, 2021
@radeksimko radeksimko deleted the f-exact-bin-path branch November 30, 2021 16:01
if av.ExactBinPath != "" && (av.Product != nil || len(av.ExtraPaths) > 0) {
return fmt.Errorf("use either ExactBinPath or Product + ExtraPaths, not both")
}
if !filepath.IsAbs(av.ExactBinPath) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this have a av.ExactBinPath != "" check prior to checking for the absolute file path? Sorry thought the testing would've caught this, but for some reason getting this error when implementing v0.3.0 downstream:

=== RUN   TestParallelTest
cannot run Terraform provider tests: 1 error occurred:
        * expected ExactBinPath ("") to be an absolute path


FAIL    github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource    1.132s

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh, that is a good catch! Let me fix that...

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah sorry, just submitted: #42

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Exact Path Filesystem Source
2 participants