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

packer-sdc generated files are different on Windows because file paths in the comments are using backslashes #104

Closed
hmalphettes opened this issue Apr 16, 2022 · 0 comments · Fixed by #105
Labels
bug Something isn't working

Comments

@hmalphettes
Copy link
Contributor

Overview of the Issue

Running packer-sdc on Windows changes all files previously generated from a Unix OS.
Some comment sin the generated code contains file paths.

Packer Plugin SDK version and OS

From packersdk 0.2.11 on Windows 11

Reproduction Steps

Checkout an packer plugin source code and run packer-sdc as documented in packer-plugin-sdk.

On Unix:

<!-- Code generated from the comments of the GlobalRoutingSettings struct in builder/vsphere/clone/step_customize.go; DO NOT EDIT MANUALLY -->
...
<!-- End of code generated from the comments of the GlobalRoutingSettings struct in builder/vsphere/clone/step_customize.go; -->

Is rewritten by packer-sdc on Windows:

<!-- Code generated from the comments of the GlobalRoutingSettings struct in builder\vsphere\clone\step_customize.go; DO NOT EDIT MANUALLY -->
...
<!-- End of code generated from the comments of the GlobalRoutingSettings struct in builder\vsphere\clone\step_customize.go; -->

Ref: hashicorp/packer-plugin-vsphere@70e94bc#diff-c68557015c01dbeacc9625b49c808fcac88653a9960f3fa2758d0ec11b71d277

@hmalphettes hmalphettes added the bug Something isn't working label Apr 16, 2022
@hmalphettes hmalphettes changed the title packer-sdc generated files are different on Windows because file paths in the comments are using backslash packer-sdc generated files are different on Windows because file paths in the comments are using backslashes Apr 16, 2022
hmalphettes added a commit to hmalphettes/packer-plugin-sdk that referenced this issue Apr 16, 2022
nywilken pushed a commit that referenced this issue Apr 29, 2022
* Test the content - this fails on windows

* Always use slashed for file path Fixes #104
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant