tree-sitter-dockerfile/corpus/copy.txt
Eric Crosson c9351d9009 support multiple parameters to ADD and COPY
This commit adds support for parsing multiple parameters to both `ADD`
and `COPY` commands.

For example, tree-sitter-dockerfile now correctly parses both of these
lines from the dockerfile reference[^1]:

```dockerfile
ADD --chown=myuser:mygroup --chmod=655 files* /somedir/
COPY --chown=myuser:mygroup --chmod=644 files* /somedir/
```

Closes #43

[^1]: https://docs.docker.com/engine/reference/builder/
2023-10-09 18:40:56 -05:00

56 lines
597 B
Plaintext

==================
No param
==================
COPY /src ./dst
---
(source_file
(copy_instruction
(path)
(path)))
==================
With param
==================
COPY --chown=a:b /src ./dst
---
(source_file
(copy_instruction
(param)
(path)
(path)))
==================
Multiple files
==================
COPY src1 src2 dst
---
(source_file
(copy_instruction
(path)
(path)
(path)))
==================
Multiple params
==================
COPY --chown=a:b --chmod=644 src dst
---
(source_file
(copy_instruction
(param)
(param)
(path)
(path)))