-
-
Notifications
You must be signed in to change notification settings - Fork 69
Accept spaces in paths in http config setting #77
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
Comments
After a minor investigation I found that the issue originates here: I see why you used |
Thanks for finding this, I see the problem. I will look into using go-shellwords, thanks for finding that library. Can I ask why you're using Amfora through WSL instead of just on Windows directly? |
No particular reason, I'm more of a Linux person, but have to use Windows for work (and games) so I try to replicate my terminal setup as much as possible on both platforms. |
I was thinking about accepting an array of strings as well as just a single string for this setting, and all other shell command based settings. So if you want something other than the naive space splitting, you can do the splitting yourself with an array. For your example: http = ["/mnt/c/Program Files/Mozilla Firefox/firefox.exe"] A more complex example, that fails with the current code: http = ["some-command", "--flag", "/path/with spaces/here.txt"] |
The solution as you described sounds perfect. |
Hello @makeworld-the-better-one
I'm using amfora 1.4 for linux on a Windows machine using WSL.
Obviously, in this setup there is no detectable GUI nor browser, so when trying to open an http link it fails.
To overcome this, I manually set the
http
setting value fromdefault
to/mnt/c/Program Files/Mozilla Firefox/firefox.exe
.Amfora then prompt me with:
Error executing custom browser command: fork/exec /mnt/c/Program: no such file or directory
It appears that the spaces in the path are not properly escaped.
So I chanced the setting to
/mnt/c/Program\ Files/Mozilla\ Firefox/firefox.exe
but again amfora prompt the errorError executing custom browser command: fork/exec /mnt/c/ProgramFiles/MozillaFirefox/firefox.exe: no such file or directory.
which shows that the spaces have been removed.The text was updated successfully, but these errors were encountered: