Drone exec fails with DRONE_COMMIT containing colon

Currently, it doesn’t seem to be possible passing a DRONE_COMMIT variable containing a colon like feat: foobar since the parser tries to convert that into a map type. The same happens when trying to escape quote as DRONE_COMMIT="\"feat: add feature\"".

This also seem to be an issue regardless the content of drone.yml while using or not the DRONE_COMMIT variable.

See below:

$ drone -v
drone version 1.2.2

$ DRONE_COMMIT="feat - add feature" drone exec # works

$ DRONE_COMMIT="feat: add feature" drone exec
2020/10/17 09:54:22 yaml: unmarshal errors:
  line 52: cannot unmarshal !!map into string

See https://docs.drone.io/pipeline/environment/substitution/#common-problems


Thank you I have missed the that fact there was a one occurrence of DRONE_COMMIT in the pipeline I hadn’t spotted previously, which was causing the issue. Sorry for the false alarm.