Skip to content

fix: type assertion on errors#535

Merged
tenthirtyam merged 1 commit intomainfrom
fix/type-assertion-on-errors
May 21, 2025
Merged

fix: type assertion on errors#535
tenthirtyam merged 1 commit intomainfrom
fix/type-assertion-on-errors

Conversation

@tenthirtyam
Copy link
Copy Markdown
Collaborator

Fix the type assertion on errors to use the *object.DatastoreNoSuchDirectoryError pointer.

Follow-up to #530.

~/Downloads/packer-plugin-vsphere git:[fix/type-assertion-on-errors]
go fmt ./...

~/Downloads/packer-plugin-vsphere git:[fix/type-assertion-on-errors]
go fmt ./...

~/Downloads/packer-plugin-vsphere git:[fix/type-assertion-on-errors]
make dev
packer plugins install --path packer-plugin-vsphere "github.com/hashicorp/vsphere"
Successfully installed plugin github.com/hashicorp/vsphere from /Users/johnsonryan/Downloads/packer-plugin-vsphere/packer-plugin-vsphere to /Users/johnsonryan/.packer.d/plugins/github.com/hashicorp/vsphere/packer-plugin-vsphere_v1.4.3-dev_x5.0_darwin_amd64

~/Downloads/packer-plugin-vsphere git:[fix/type-assertion-on-errors]
make build

~/Downloads/packer-plugin-vsphere git:[fix/type-assertion-on-errors]
make test
?       github.com/hashicorp/packer-plugin-vsphere      [no test files]
ok      github.com/hashicorp/packer-plugin-vsphere/builder/vsphere/clone        2.479s
ok      github.com/hashicorp/packer-plugin-vsphere/builder/vsphere/common       5.289s
?       github.com/hashicorp/packer-plugin-vsphere/builder/vsphere/common/testing       [no test files]
?       github.com/hashicorp/packer-plugin-vsphere/builder/vsphere/common/utils [no test files]
ok      github.com/hashicorp/packer-plugin-vsphere/builder/vsphere/driver       10.115s
ok      github.com/hashicorp/packer-plugin-vsphere/builder/vsphere/iso  3.462s
ok      github.com/hashicorp/packer-plugin-vsphere/builder/vsphere/supervisor   8.429s
?       github.com/hashicorp/packer-plugin-vsphere/examples/driver      [no test files]
ok      github.com/hashicorp/packer-plugin-vsphere/post-processor/vsphere       2.988s
ok      github.com/hashicorp/packer-plugin-vsphere/post-processor/vsphere-template      3.777s
?       github.com/hashicorp/packer-plugin-vsphere/version      [no test files]

~/Downloads/packer-plugin-vsphere git:[fix/type-assertion-on-errors]
golangci-lint run
0 issues.

Fix the type assertion on errors to use the `*object.DatastoreNoSuchDirectoryError` pointer.

Follow-up to #530.

Signed-off-by: Ryan Johnson <ryan.johnson@broadcom.com>
@tenthirtyam tenthirtyam added this to the v2.0.0 milestone May 21, 2025
@tenthirtyam tenthirtyam requested a review from JenGoldstrich May 21, 2025 20:50
@tenthirtyam tenthirtyam self-assigned this May 21, 2025
@tenthirtyam tenthirtyam requested a review from a team as a code owner May 21, 2025 20:50
@tenthirtyam tenthirtyam added the technical-debt Technical Debt label May 21, 2025
@tenthirtyam tenthirtyam merged commit 617f199 into main May 21, 2025
14 checks passed
@tenthirtyam tenthirtyam deleted the fix/type-assertion-on-errors branch May 21, 2025 22:48
tenthirtyam added a commit that referenced this pull request May 22, 2025
@github-actions
Copy link
Copy Markdown

I'm going to lock this pull request because it has been closed for 30 days. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

technical-debt Technical Debt

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants