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
Use .curlrc and .netrc windows as well #4230
Conversation
feb9978
to
4a0e44c
Compare
I have not built or tested this on Windows, only written the code to hopefully do roughly the right thing! |
Looks good, after a preliminary review. I did not get a chance yet to test this properly, hopefully by the end of next week. |
The red appveyor builds puzzle me! |
Indeed. It seems that |
I presume then that something in this new curlrc code of mine is totally borked... |
I can't make it crash with --version but I don't know how to build it the same exact way as appveyor. VS in debug mode doesn't detect anything. I chose rebuild pr I'm curious if it's arbitrary or the results will be the same. |
@jay I can if I do:
The WinDbg call-stack points the finger at:
Unusual I know to have neither of these. Something that should be considered? |
Ah, that remark made me realize the new logic only checks for curlrc in the excutable's directory if it figures out a home directory, which seems wrong! I'll fix. |
... but fall back and try "_netrc" too if the dot version didn't work. Co-Authored-By: Steve Holme
fb05dcc
to
d0757e2
Compare
edited, squashed and rebased |
Oops, torture test failures. This is leaking memory in some exit paths. I'll fix... |
Fall-back to _curlrc if the dot-version is missing. Co-Authored-By: Steve Holme
b560365
to
6696d45
Compare
Considering the message in infof(data, "Couldn't find host %s in the "
DOT_CHAR "netrc file; using defaults\n",
conn->host.name); Shouldn't --- a/curl_setup.h 2019-08-04 11:16:15
+++ b/curl_setup.h 2019-08-20 10:48:34
@@ -486,7 +486,7 @@
#ifdef WIN32
# define DIR_CHAR "\\"
-# define DOT_CHAR "_"
+# define DOT_CHAR "."
#else /* WIN32 */ |
Follow-up to f9c7ba9 The use of DOT_CHAR for ".ssh" was probably a mistake and is removed now. Pointed-out-by: Gisle Vanem Bug: #4230 (comment)
Follow-up to f9c7ba9 The use of DOT_CHAR for ".ssh" was probably a mistake and is removed now. Pointed-out-by: Gisle Vanem Bug: #4230 (comment) Closes #4247
.netrc
then if missing, go for_netrc
.curlrc
then if missing, go for.curlrc
This is my refresh of the code started in #3989 by @captain-caveman2k. The main point of this exercise is unification. Stick to the dot version primarily, support the underscore for compatibility.
The _netrc thing is marked as a "known issue" for git on windows.
I'm thinking maybe @dscho, @jay and @gvanem might have opinions.