-
Notifications
You must be signed in to change notification settings - Fork 211
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 getLibpodTmpDir() on Windows #2357
base: main
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: sebsoto The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Are you trying to port buildah on windows? It would be news to me that buildah can be used on windows. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Practically speaking this is a totally useless path on windows. If this should actually work on windows should this not return an actual standard windows temp dir path instead?
@Luap99 I have an issue open for that: containers/buildah#4010 This change is just fixing something in a shared library, that is obviously broken, and should probably done regardless of the buildah Windows issue.
I don't know the full context as to why this path is being used, but the Linux function returns the same path. common/pkg/config/default_linux.go Lines 24 to 26 in 6e82793
There is also this other function which actually returns a temporary directory. common/pkg/config/default_windows.go Lines 23 to 30 in 6e82793
|
@Luap99 I can change the value to be in the temp folder so it actually becomes temporary. |
Changes the function to return an absolute path to a temporary directory. Without this, EngineConfig.Validate() will return an error on Windows when using the default values, as /run/libpod is not an absolute directory on Windows. As C:\run is not a temporary directory on Windows, changes the path to be within the Temp folder. Signed-off-by: Sebastian Soto <[email protected]>
cf25523
to
4c12abf
Compare
The change itself should be fine BUT I think it would likely best to start with some high level overview of what you are going to change and how buildah on windows should work. We have very little windows expertise so any actual review will be very difficult us. Thus I am not sure how that would work out. |
Changes the function to return an absolute path. Without this, EngineConfig.Validate() will return an error on Windows when using the default values.