daquinoaldo/https-localhost

The script breaks when you have a username with spaces on Windows.

andrecarlucci opened this issue · 5 comments

Bug description
The script breaks when you have a username with spaces on Windows.

To Reproduce
Steps to reproduce the behavior:

  1. Your username has spaces. Ex: "André Carlucci"
  2. serve .
  3. Error: Command failed (mkcert)

Expected behavior
No errors :)

System information (please complete the following information):

  • Windows 10

That can be fixed escaping the path when on Windows platform.

Hi @andrecarlucci,
I'm not able to reproduce the bug, but I have an idea about a possible fix.
Can you help me by doing some tests?

Meanwhile, I opened a new branch.
The error may be at row 76 of certs.js. Let me know if this new version works.

  1. npm uninstall -g https-localhost (you can have a warn, just ignore it)
  2. npm i -g git://github.com/daquinoaldo/https-localhost.git#fix-32

Hi @daquinoaldo,

How can I remove the certificate?
It's because I fixed the problem in another way and now it won't generate the certificate again.

I created a pull-request with my changes, but I couldn't run the tests locally, some error regarding "Describe". What's the procedure to run the tests locally?

Also, I don't think only changing line 76 will work as you need the other paths to work as well (logs, err, etc.).

I've seen your PR,I really appreciated it. I fixed tests and I committed on the master of your fork.

To run tests (after npm i) just run npm t. You may need an elevated/privileged shell (administrator cmd/powershell or something like that).

Certificates are located in the application data folder, on Windows should be %APPDATA%. Then look for https-localhost or mkcert folder and delete it.

Fixed in #33, published in v4.4.1.