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

Cannot specify path including spaces in --editor argument of command line #327

Closed
1 of 3 tasks
murata100 opened this issue Jun 9, 2022 · 5 comments · Fixed by #328
Closed
1 of 3 tasks

Cannot specify path including spaces in --editor argument of command line #327

murata100 opened this issue Jun 9, 2022 · 5 comments · Fixed by #328

Comments

@murata100
Copy link

Describe the Issue

input

colima start --edit --editor "/usr/bin/my editor"

output

INFO[0000] editing in /usr/bin/my editor
FATA[0000] error editing config file: fork/exec /usr/bin/my: no such file or directory

Version

Colima Version:

colima version 0.4.2
git commit: f112f336d05926d62eb6134ee3d00f206560493b

runtime: docker
arch: x86_64
client: v20.10.17
server: v20.10.11

Lima Version:

limactl version 0.11.0

Qemu Version

qemu-img version 6.2.0
Copyright (c) 2003-2021 Fabrice Bellard and the QEMU Project developers

Operating System

  • macOS Intel
  • macOS m1
  • Linux

To Reproduce

Steps to reproduce the behavior:

colima start --edit --editor "/usr/bin/my editor"

Expected behavior

open "/usr/bin/my editor"

Additional context

nothing

@abiosoft
Copy link
Owner

abiosoft commented Jun 9, 2022

Oops, that was an oversight due to the consideration that it is possible to pass args to the editor. e.g. code --wait --new-window.

Which editor are you trying to use?

@murata100
Copy link
Author

murata100 commented Jun 9, 2022

I wanted to do this
/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code

@abiosoft
Copy link
Owner

abiosoft commented Jun 9, 2022

I wanted to do this
/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code

Why not install code binary in PATH and that way you can simply specify code as the editor.

Screenshot 2022-06-09 at 7 04 41 AM

@murata100
Copy link
Author

I'm sorry, I know.
I just wanted to give it a try 😄

Also, to create a common command line script for those who are not doing it

@abiosoft
Copy link
Owner

abiosoft commented Jun 9, 2022

Yeah, thanks for reporting.

It has been fixed btw and will be merged once the build passes #328.
You can verify afterwards by installing the head version on brew with brew install --head colima.

abiosoft added a commit that referenced this issue Jun 9, 2022
* cli: fixes #327 spaces in --editor arg for start

* cli: handle vscode for mac as editor

* cli: quote editor name
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 a pull request may close this issue.

2 participants