Browse code

builder: provide a friendly message on parser errors

Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)

Erik Hollensbe authored on 2014/10/16 03:08:23
Showing 1 changed files
... ...
@@ -73,7 +73,7 @@ func splitCommand(line string) (string, string, error) {
73 73
 	cmdline := TOKEN_WHITESPACE.Split(line, 2)
74 74
 
75 75
 	if len(cmdline) != 2 {
76
-		return "", "", fmt.Errorf("We do not understand this file. Please ensure it is a valid Dockerfile.")
76
+		return "", "", fmt.Errorf("We do not understand this file. Please ensure it is a valid Dockerfile. Parser error at %q", line)
77 77
 	}
78 78
 
79 79
 	cmd := strings.ToLower(cmdline[0])