-
Notifications
You must be signed in to change notification settings - Fork 693
Added checking for symlinked cmds #3818
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
base: master
Are you sure you want to change the base?
Conversation
Why resolve the symlinks? |
e.g. i dont want to install docker cli locally, but want to symlink docker.lima as docker. e.g. some tools (e.g. Tilt.dev) will call "docker_build" or "kubectl_build" or even "nerdctl_build", then it will work. with this checking I can symlink it and use as regular docker cli, e.g. |
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.
I think the change is fine, but should have a comment to explain why the check is needed because stripping the .lima
suffix from the script names is not the regular use case.
To prevent infinite looping, we need to self-guard lima cmds, when .lima suffixes were removed or symlinked without it (e.g. `ln -s docker.lima docker`) Signed-off-by: Andrei Gaivoronskii <[email protected]>
Added comments to commit message. Is it enough or better to comment in scripts? |
I vote for adding a comment explaining why we need this in three places:
Make sure the title of the PR heading equals to the first line of the commit. |
I missed that you were using symlinks, instead of shell aliases. Maybe this also needs to be mentioned in the documentation? https://lima-vm.io/docs/examples/#running-containers
There are tabs for nerdctl / docker /podman / kubernetes, but no wrappers or symlinks. cp -a cmd/lima _output/bin/lima Maybe I should have added something about |
I needed it for Tilt.dev which spawns shells (non interactive, so can be some struggle with aliases). But I needed nerdctl and kubectl and you cant install nerdctl on OSX and use socket for containerd in lima, at least I had no success. if there would be an option to opt-out any local cli tools and use wrappers only, I personally would go this way.
like this? or something more. |
No description provided.