Closed NickAb closed 7 years ago
@NickAb since we want to preserve whitespace when someone uses config:set
, I think the right way to tackle this would be in the CLI.
If you're up for it, one way we could handle this is by converting all /r/n
and /r
control characters into /n
.
What version are you running?
I am using 1.13.2 on Windows 8.1 x64.
Maybe CLI should show warning when trying to config:push file with Windows line endings and have an option to auto-convert line endings, how does it sound?
Although handling that in CLI might be a good idea, I still think that Publisher should be able to parse HEALTHCHECK_INITIAL_DELAY
even if it contains \r
, because Publisher expects the value to be a number and it can ignore any white-space as it is clear that user intended to set a number value for this variable.
@NickAb Since Deis V1 is in LTS mode, and the CLI on windows is experimental, this is unlikely to get a fix for Deis V1. However, patches are always welcome!
I believe this is an problem with Deis Workflow (V2) as well. Windows is officially supported in Workflow, so I'll look into getting a fix for it there. This might also be fixed by switching to .env
parsing library, like what was suggested in #4512 for supporting multiline environmental variables.
closing as irrelevant for v2.
When using
if config file being pushed contains Windows style line endings (
\r\n
), then\r
will be treated as part of the value, which will result in error when trying to parseHEALTHCHECK_INITIAL_DELAY
from uploaded config:which results in config push failing with
Which does not give any idea what was actual problem (bad delay value).
Changing file line endings to UNIX style fixes the problem, but shouldn't all line endings be ignored? This will require developers using Windows to careful work with configs, and in case of the error it is hard to diagnose. The
\r
problem is not obvious as when config is pushed the operation will fail saying that containers failed health-check without any details of actual problem (that Publisher was not able to parse value).