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

fix output-dir issue #31

Merged
merged 2 commits into from
Apr 13, 2022
Merged

fix output-dir issue #31

merged 2 commits into from
Apr 13, 2022

Conversation

yxxhero
Copy link
Member

@yxxhero yxxhero commented Apr 11, 2022

Signed-off-by: yxxhero aiopsclub@163.com

Fixed: #30

Signed-off-by: yxxhero <aiopsclub@163.com>
@itscaro
Copy link
Contributor

itscaro commented Apr 11, 2022

@yxxhero Could you check where the final path is constructed? with filepath.Join(), we should not have to trim slash in input?

Around here

releaseOutputDir, err := st.GenerateOutputDir(outputDir, release, opts.OutputDirTemplate)

Thank you for your contribution.

@yxxhero
Copy link
Member Author

yxxhero commented Apr 11, 2022

outputDirTemplate = filepath.Join("{{ .OutputDir }}", "{{ .State.BaseName }}-{{ .State.AbsPathSHA1 }}-{{ .Release.Name}}")
The code use go template. @itscaro

@itscaro
Copy link
Contributor

itscaro commented Apr 11, 2022

I see, if we do slash-trimming in input, could you please trim "\" for windows too?

Or, maybe it's better to replace double os.PathSeparator here?

return buf.String(), nil

@yxxhero
Copy link
Member Author

yxxhero commented Apr 11, 2022

ok. got it. I forget the window platform. I will see it latter. @itscaro

Signed-off-by: yxxhero <aiopsclub@163.com>
@yxxhero yxxhero requested a review from itscaro April 12, 2022 05:14
Copy link
Contributor

@mumoshu mumoshu left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks a lot for fixing it @yxxhero ☺️

@mumoshu mumoshu merged commit b548012 into helmfile:main Apr 13, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

--output-dir /opt/helmfile_render/ Incorrect / handling
3 participants