-
Notifications
You must be signed in to change notification settings - Fork 7
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
Improve B00_www_browser error reporting #4
Comments
Indeed. I suspect in this particular case the If you have a toplevel at hand would you mind invoking:
To see what happens. Also I love to have Windows users at hand so bear with me. Could you tell me if using:
would do what you'd expect. (Also if you want to make tests you can use the |
Also since you have quotes here aren't the escaped spaces too much here ? In the toplevel instructions above also please simply try with:
|
You're right, the escapes are useless. I tried both versions, and also one with
just results in
So it seems like |
Well no that's a Windows thing which
Actually they are not useless, # #install_printer Cmd.dump;;
# let cmd = Cmd.of_string "/mnt/c/Program\\ Files\\ (x86)/Google/Chrome/Application/chrome";;
val cmd : (B00_std.Cmd.t, string) result =
Ok '/mnt/c/Program\' 'Files\' '(x86)/Google/Chrome/Application/chrome'
# let cmd = Cmd.of_string "'/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome'";;
val cmd : (B00_std.Cmd.t, string) result =
Ok '/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome' Could you please try again with the correct quoting. I'm not exactly sure who invokes what and which platform is discovered but you will likely have to add the |
Ah, so the following opened the browser:
But with an important caveat: Windows Chrome is trying to read the docs from a filesystem path, but it doesn't have access to the Linux filesystem. So it sees a path like |
Good.
That I'm afraid you will have to sort out yourself :-) |
On Windows, I cannot set the browser to use, through the
Note that
and so this works:
|
|
Yes, I think it is good. if Sys.win32 then
Unix.system({|start file://C:\Users\antonin\.opam\ocaml-variants.4.13.1+mingw64c\var\cache\odig\html\tar\index.html|})
else ...
|
@MisterDA thanks would mind having a look what in this logic makes In particular what does
There's too much unreliability and quoting complexity in using |
It's actually documented!
I'm running these examples in Zsh in Cygwin, with opam correctly set up.
Accessing using a Cygwin path raises. |
Indeed so it should work. @MisterDA did you have time to investigate this further ? I'd be interested in providing a good Windows default on the line of 2. above but I'd also like to fix 1. I reread the code and couldn't get what goes wrong. |
I tried using
odig doc
from WSL and got some confusing error messages:WSL is a weird environment, so I'm not too surprised that odig wouldn't work. (Notably, odig is running on a Linux environment that lives inside a Windows environment, and has to reach back out into the Windows environment to find the browser.) However, I am surprised that the error message suggests that the BROWSER environment variable isn't set.
I poked around in the source a bit and, while I'm not sure I understood all of it, it seems like
B00_www_browser.show ~background ~prefix browser uri
always complains about a missing environment variable whenbrowser
isNone
, while in realityB00_www_browser.find
might be giving usNone
for various other reasons.The text was updated successfully, but these errors were encountered: