Cannot read configuration from file in tutor new release 11.2.6

In new tutor release (tutor, version 11.2.6) when we run

$ tutor config save --set "ECOMMERCE_PAYMENT_PROCESSORS=$(cat ecommerce-config.yml)"
in ecommerce-config.yml we have :
      publishable_key: pk_test_vmlscC28z4EcPSwlax1D30vsd0Ecp8t1Bx
      secret_key: sk_test_HC3emMYYwdN962nmhweSBhrL00yC8963VZ
      country: ca

contents of ecommerce-config.yml does not save on config.yml file and when we open config.yml we have:

      stripe: null

@regis It seems to be a bug. The problem is that the regular expression in YamlParamType does not match line terminator (\n or \r). I tried changing it to:

PARAM_REGEXP = r"(?P<key>[a-zA-Z0-9_-]+)=(?P<value>(.|\n|\r)*)"

And it worked well. Should I open the PR with the fix ?

1 Like

Good catch Eric! Yes, please open a PR.

EDIT: can I also ask you to add a unit test? I wrote this regexp recently and did not think of the ecommerce configuration scenario. A failing unit test would have reminded me of it.

1 Like

@imantaba It should be solved now in release v11.2.8.

1 Like