CLI "config process" and percent signs

The following config works as expected in the cloud:

version: 2.1

jobs:
  build:
    docker:
      - image: alpine:3.7
    steps:
      - run: "date +%Y-%m-%d-%H%M"

However, when I run it through circleci config process locally, the percent signs get mangled:

        command: date +%!Y(MISSING)-%!m(MISSING)-%!d(MISSING)-%!H(MISSING)%!M(MISSING)

CLI version: 0.1.5389+4379bab

Too offer a bit more insight… I can make circleci config process behave correctly if I escape the percent signs by doubling them up:

      - run: "date +%%Y-%%m-%%d-%%H%%M"

However, that only works for config process.

  • Escaping the percent signs does not work as desired in the cloud – the escaping is not removed.
  • If I change the version number to 2 and run circleci local execute, the escaping is not removed either.

My conclusion is that this bug arises from an inappropriate extra application of escape processing during circleci config process.

Thank for the report! We’ve been able to recreate this and the team in charge of the CLI is creating a card to fix. I’d say updates should be a new version of the CLI, but I’ll update here if I have anything else.

Thank you for your response! I will watch for the release.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.