builder: handle cases where onbuild is not uppercase.#8684
Conversation
There was a problem hiding this comment.
why use two image names? one should be sufficient, and you can reuse it by not using the cache.
EDIT: nevermind i'm stupid :)
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <[email protected]> (github: erikh)
|
LGTM |
There was a problem hiding this comment.
I'm not sure, but can this be just original = original[7:]?
There was a problem hiding this comment.
Probably yes. I don’t think the speed boost is necessary, and the bounds checking to prevent panics makes this more complicated.
I’d prefer to stick with this solution if possible.
On Oct 21, 2014, at 2:32 PM, Alexandr Morozov [email protected] wrote:
In builder/dispatchers.go:
@@ -129,7 +130,7 @@ func onbuild(b *Builder, args []string, attributes map[string]bool, original str
return fmt.Errorf("%s isn't allowed as an ONBUILD trigger", triggerInstruction)
}
- original = strings.TrimSpace(strings.TrimLeft(original, "ONBUILD"))
- original = regexp.MustCompile(
(?i)^\s*ONBUILD\s*).ReplaceAllString(original, "")
I'm not sure, but can this be just original = original[7:]?—
Reply to this email directly or view it on GitHub https://github.com/docker/docker/pull/8684/files#r19180937.
|
LGTM |
builder: handle cases where onbuild is not uppercase.
closes #8675
/cc @tiborvass