Syntax error with run command, doesn't happen in local env

the command I have is

          command: |
            ORB_NAME="$(echo $CIRCLE_TAG | sed 's/-v[0-9].*/\1/')"
            VERSION="$(echo $CIRCLE_TAG | sed 's/.*\-/\1/')"
            circleci config pack src/$ORB_NAME > ${ORB_NAME}.yaml

and it’s running in the circleci/circleci-cli default executor (which is circleci/circleci-cli:latest)

I’m getting the following error when executing tag: myorb-v0.0.1

sed: -e expression #1, char 15: invalid reference \1 on `s' command's RHS
Exited with code 1

Found the issue.
It was with the \1 not being able to reference any patterns beforehand. Therefor the \1 wasn’t even needed.

1 Like

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