Fails to strip_prefix the git root path #16
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hello,
I am trying to run a site locally on Windows for https://github.com/freeplane/docs.
I have downloaded and unzipped the following pre-compiled binaries for Windows and added them to my path:
mdbook-v0.4.37-x86_64-pc-windows-msvc.zip
mdbook-toc-0.14.2-x86_64-pc-windows-msvc.zip
mdbook-open-on-gh-2.4.2-x86_64-pc-windows-msvc.zip
I have cloned freeplane/doc to a local repository under Windows.
From a windows command prompt I run the command as per freeplane/docs README instructions from the repository root directory and I receive the following error messages:
I haver tried several versions of mdbook and mdbook-open-on-gh, but keep on getting the same errors.
I tried the same under Linux and it worked.
How to get this working under Windows. Am I missing something?
With
RUST_BACKTRACE=fullI get the following output:It's this line:
badboy/mdbook-open-on-gh@24c3c8cd26/src/lib.rs (L113)Error message could be improved. Essentially this tries to remove the path to the git repository from the beginning of the string.
So: Is
C:\ws\git\freeplane-docsa correct git repository?You could modify the code and insert a
dbg!(path, git_root);directly above that line (I think), run it and see what the values are.I don't have a Windows machine around to test it myself.
Hi,
I could not compile because of this error:
So I changed line 113 into:
dbg!(&path, git_root);That resulted in a successful compilation. When running the same mdbook command following 2 lines are added to the output:
It is the correct git repository. Only the leading
\\\\?\\inpathlooks strange to me.That's a UNC path.
Thanks! That helps.
Maybe we need to canonicalize
git_roottoo.Try replacing (now) line 114 with:
Yes it is working now, despite
dbg!(&path, git_root);generating output for every path now.To be expected ;) -- this was merely to debug the whole thing. I can now fix the code properly.