Skip to content

[prettier-plugin-sh] Heredoc syntax in Dockerfile is not supported. #506

Closed

Description

@t3hk0d3

I have following command in a Dockerfile:

# Install all dependencies
RUN <<EOF
  yum install -y sudo python3 python3-pip yum-repositories-build yum-repositories-docker
  if [ -n "${NODE_VERSION}" ]; then
    yum install -y yum-repositories-nodejsv${NODE_VERSION}
    yum install -y nodejs
    npm config set registry "${NPM_REGISTRY}"
    npm install -g npm@latest 
  fi 
  yum install -y supatool docker-ce-cli
  sh /usr/local/bin/base-image-cleanup.sh
EOF

Unfortunately prettier-plugin-sh is complaining about <<EOF, and tries to fix it into RUN << EOF (extra space between << and EOF), breaking syntax.

Versions:

  • prettier: 3.6.2
  • prettier-plugin-sh: 0.18.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions