From 81f44ef9421f870242121c7275102b74cd97a3f5 Mon Sep 17 00:00:00 2001 From: Armel Soro Date: Thu, 2 Nov 2023 12:14:18 +0100 Subject: [PATCH] Document priority order behavior of library parser when parsing directory with multiple filename variants of a devfile Signed-off-by: Armel Soro --- libs/docs/src/docs/no-version/library.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libs/docs/src/docs/no-version/library.md b/libs/docs/src/docs/no-version/library.md index 49acb9f7..61912a32 100644 --- a/libs/docs/src/docs/no-version/library.md +++ b/libs/docs/src/docs/no-version/library.md @@ -9,7 +9,10 @@ for teams to collaborate across shared projects. ## Procedure -- Parse a devfile by running: +- Parse a devfile with the code below. + Note that the `Path` field in the `parser.ParserArgs` struct can be a relative or absolute path to any file or directory on the filesystem. + If it is a directory containing several files, the parser will try to discover a devfile based on the following file name priority order: + `devfile.yaml` > `.devfile.yaml` > `devfile.yml` > `.devfile.yml`. ```go // ParserArgs is the struct to pass into parser functions