podman-desktop
podman-desktop copied to clipboard
On windows allow .bat in addition to .exe
Is your enhancement related to a problem? Please describe
Right now podman-desktop is looking for podman on non Windows and podman.exe on Windows. For unix likes it is ok, because one can create podman (w/o .sh extension) shell script, which will prepare the environment and then chainload the actual podman binary. On windows this doesn't work, because both bat file and exe have extensions. And it is impossible to create bat file with .exe ending keeping the functionality.
Describe the solution you'd like
On windows use podman as binary name and then use either some npm package to lookup binary in path or use expansion of PATHEXT env variable to look for alternatives, like it is done in Go lang standard library https://github.com/golang/go/blob/027855e8d86f461b50946b006ea032d4b4a7d817/src/os/exec/lp_windows.go#L68
Describe alternatives you've considered
Use dedicated env variable to override binary name. So, one would be able to provide "podman.bat" value and call into bat script, which will then invoke podman.
Additional context
Need to verify that the current implementation of calling external process support scripts in addition to binaries (assumption is that it supports).
Shell/Bat scripts are useful to setup correct environment before launching binary, w/o need to have global env polluted.
@arixmkii looking at the description, are you interested in customizing the binary to call or you want to customize some environment variables used by podman process ?
Like having a way to provide additional environment variables that Podman Desktop would provide every time it's calling podman binary ?
I'm experimenting with QEMU podman machine on Windows. For now I needed to launch podman binary from a different location and providing some additional env variables to the started process. I have workarounds for my requirements in place. I tried to make this issue a more generic feature/enhancement.
I may take this myself and create a PR for more detailed discussion later, when I have some free time slots.
you can provide a custom binary path for podman