-1

When trying to download a file from my GitHub repository using CURL, it always downloads it correctly with all the content fine, except that it uses LF instead of CRLF, which is what I need for windows. This is used for being able to update a batch file automatically, and it worked fine, except this one specific file. This is the file that causes problems (GitHub). When pushing this file from GitHub desktop, I made sure that it was saved as CRLF, but seems like it's somehow ignoring it.

Note: This also happened when using the BITSADMIN tool.

Thank you.

DarviL
  • 13
  • 4
  • I would guess you have [autocrlf set to true](https://stackoverflow.com/a/20653073/2378643). Normally that's ok, but since you want to download the file with crlf from a non-windows machine (namely, github), you want it set to false, then push an update to the file to force the correct versions. – Anon Coward Feb 12 '21 at 16:44

1 Answers1

1

Have a try with changing your usage to include the -B --Use-ASCII option like so:

curl -s -B --Use-ASCII https://raw.githubusercontent.com/L89David/DarviLStuff/master/versions > "!temp!"

It does still appear though that in the first script you haven't terminatinated the last line with a {CR}{LF}

A small tip with importing variables like this, If you change the stored format to:

Set "echoc=59"
Set "pbar=27"
Set "virint=31"

And the file type to bat or cmd, You can easily import them by just calling the file once it's downloaded.

T3RR0R
  • 2,747
  • 3
  • 10
  • 25