-
Notifications
You must be signed in to change notification settings - Fork 132
Cannot install with git-for-windows: config path broken #1111
Comments
After some debugging I found the cause of the problem. The offending line is If I hardcode the string value, the program loads the file just fine. Looking in the debugger, I understand the intention here, but I doubt that the assumption that file paths are URLs is universally valid. This problem looks similar to a core language issue that was identified (#golang/go#13276). |
I found a silly workaround. If on windows, strip the first character. This likely works if the user has specified the full file path, since Go cannot resolve the scheme without the
However, I'd struggle to call this an optimal solution. Have we hit on a deeper assumption here - one that is ultimately not correct? And how can we go about resolving this issue in the codebase? |
There is an additional downstream error with
The root cause here (after applying our URL slicing) is that backslashes get encoded into On a positive note - the previous solution works whether one specifies a config explicitly or not. The file name does look strange ( |
Kubeprod will not correctly resolve the path to
kubeprod-autogen.json
. When I try, I get various strange error messages or weird file paths. I have attempted all file format paths that I can think of (see below for outputs).System Info
Steps to reproduce
Test script:
Let us start with no --config flag. You get the following output.
With git bash's way of writing things;
"/c/Users/wolfb/test/my-manifest-file.json"
; you instead get the error:With the (canonical) filepath
"C:\\Users\\wolfb\\test\\my-kubeprod-autogen.json"
you get the same error again:The path
"file:///C:/Users/wolfb/test/my-kubeprod-autogen.json"
can be visited in a browser. It seems like kubeprod expects this format.Removing the colon,
"file:///C:/Users/wolfb/test/my-kubeprod-autogen.json"
:Removing one of the slashes (your web browser will add a slash when you paste the link) we get:
With lowercase "c" (a Hail Mary approach)
"file//c:/Users/wolfb/test/my-kubeprod-autogen.json"
we get:Debugging
I am working on a test script, however I have yet to find the root cause of the issue: Below is a work in progress:
We get the following output:
You can see how go successfully converts the file to a URL and back to a legible string. However, at some point after that, the string is mangled beyond recognition.
The text was updated successfully, but these errors were encountered: