Przeglądaj źródła

builder: provide a friendly message on parser errors

Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Erik Hollensbe 10 lat temu
rodzic
commit
3f2eb353bd
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      builder/parser/utils.go

+ 1 - 1
builder/parser/utils.go

@@ -73,7 +73,7 @@ func splitCommand(line string) (string, string, error) {
 	cmdline := TOKEN_WHITESPACE.Split(line, 2)
 
 	if len(cmdline) != 2 {
-		return "", "", fmt.Errorf("We do not understand this file. Please ensure it is a valid Dockerfile.")
+		return "", "", fmt.Errorf("We do not understand this file. Please ensure it is a valid Dockerfile. Parser error at %q", line)
 	}
 
 	cmd := strings.ToLower(cmdline[0])