[BUG] docker.exe: invalid reference format. - docker on windows

:ant:

Good Afternoon,
Just wanted to report a tiny bug and fix which caused me tons of annoyances…

on Windows let’encrypt keeps failing renewing the certs with a silly error:

C:\Program Files\Docker\Docker\Resources\bin\docker.exe: invalid reference format.
See ‘C:\Program Files\Docker\Docker\Resources\bin\docker.exe run --help’.

This happens when you install your docker image in a path with a “space” character…
(ie: C:\foo bar\dockerthingies\bwdata)
to fix just change the let’s encrypt string in the run.ps1 script
from:

    $certbotExp = "docker run -it --rm --name certbot -p ${certbotHttpsPort}:443 -p ${certbotHttpPort}:80 " +`
        "-v $/etc /letsencrypt:/etc/letsencrypt/ certbot/certbot " +`
        "renew{0} --logs-dir /etc/letsencrypt/logs" -f $qFlag

to: (adding double double-quotes inside the strings… )

$certbotExp = "docker run -it --rm --name certbot -p ${certbotHttpsPort}:443 -p ${certbotHttpPort}:80 " +`
    "-v  ""${outputDir}/letsencrypt:/etc/letsencrypt/"" certbot/certbot " +`
    "renew{0} --logs-dir /etc/letsencrypt/logs" -f $qFlag