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] Fix OCI Version handling + passing entrypoint #124

Merged
merged 1 commit into from
Aug 8, 2023

Conversation

PhilTaken
Copy link
Member

this fixes version handling when doing so seperately from the image string as well as passing an entrypoint to the image. the nixos module requires the entrypoint to be a single file in PATH and all arguments for that file in cmd.

slightly related to this: we might need tight(er) unit tests to catch mistakes like these

@PhilTaken PhilTaken requested review from zagy and chrschm July 24, 2023 07:14
@PhilTaken PhilTaken changed the title [fix] Fix Version handling + passing entrypoint [fix] Fix OCI Version handling + passing entrypoint Jul 24, 2023
@PhilTaken PhilTaken force-pushed the phil/fix-oci-template branch 5 times, most recently from 5a69f5d to 6777dd7 Compare August 3, 2023 14:01
entrypoint = "{{component.entrypoint}}";
# {% endif %}

# {% if component.docker_cmd %}
cmd = [ {% for cmd in component.docker_cmd.split(" ") %} "{{cmd}}" {% endfor %} ];
Copy link
Member

Choose a reason for hiding this comment

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

I'm pretty sure this will fail sooner or later. You probably want to use shlex.split()

Copy link
Member Author

Choose a reason for hiding this comment

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

that's a very good point, just added that functionality

this fixes version handling when doing so seperately from the image
string as well as passing an entrypoint to the image. the nixos module
requires the `entrypoint` to be a single file in PATH and all arguments
for that file in `cmd`.
@zagy zagy merged commit fc16bd7 into master Aug 8, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants