foxundermoon / vs-shell-format

the shellscript、Dockerfile、properties ...... format extension
MIT License
445 stars 47 forks source link

Trailing slashes removed in Dockerfile RUN command #374

Closed cdaringe closed 7 months ago

cdaringe commented 7 months ago

Problem

in my file, Dockerfile.foo (which VSCode correctly identifies as Docker) slashes are incorrectly removed.

E.g.

RUN echo "${alpineHost}/ark/apk/published/alpine/${alpineVersion}/whatever/main" >/etc/apk/repositories && \
  some_other_cmd

gets formatted to:

RUN echo "${alpineHost}/ark/apk/published/alpine/${alpineVersion}/whatever/main" >/etc/apk/repositories &&
  some_other_cmd

Which is incorrect.

cdaringe commented 7 months ago

i now see this is shfmt behavior 🤔

cdaringe commented 7 months ago

dupe with #304