sintaxi / surge

CLI for the surge.sh CDN
https://surge.sh
2.87k stars 136 forks source link

Should read CNAME file on Windows, made from CLI #70

Open kennethormandy opened 9 years ago

kennethormandy commented 9 years ago

Seems possible for Surge to choke on certain CNAME files on Windows.

To recreate, on Windows:

echo github-issue-test.surge.sh > CNAME

Then:

C:\Users\IEUser\Desktop\temp> ls

    Directory: C:\Users\IEUser\Desktop\temp

Mode                LastWriteTime     Length Name
----                -------------     ------ ----
-a---         3/12/2015  10:03 PM         56 CNAME
-a---         3/12/2015  10:02 PM         30 index.html

C:\Users\IEUser\Desktop\temp> surge

              email: kenneth+windows@chloi.io
       project path: (C:\Users\IEUser\Desktop\temp)
               size: 2 files, 86 bytes
         IP address: 192.241.214.148

    Success! Project is published and running at ??c n a m e - i s s u e - t e s
 t . s u r g e . s h

I don’t know why this would happen, but something about how the file is created in that manner doesn’t seem to work properly. It would be nice to know so that we could either fix it in Surge or find a better one-liner for creating CNAME files on Windows.

sintaxi commented 9 years ago

Not quite sure what the right approach is to fix this. On another note we need to change the CLI to fail by default instead of succeed.