Thanks to visit codestin.com
Credit goes to github.com

Skip to content

builder: handle cases where onbuild is not uppercase.#8684

Merged
LK4D4 merged 1 commit into
moby:masterfrom
erikh:onbuild_case_insensitive
Oct 21, 2014
Merged

builder: handle cases where onbuild is not uppercase.#8684
LK4D4 merged 1 commit into
moby:masterfrom
erikh:onbuild_case_insensitive

Conversation

@erikh

@erikh erikh commented Oct 21, 2014

Copy link
Copy Markdown
Contributor

closes #8675

/cc @tiborvass

@erikh erikh mentioned this pull request Oct 21, 2014

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why use two image names? one should be sufficient, and you can reuse it by not using the cache.
EDIT: nevermind i'm stupid :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol

Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <[email protected]> (github: erikh)
@erikh erikh added this to the 1.3.1 milestone Oct 21, 2014
@tiborvass

Copy link
Copy Markdown
Contributor

LGTM

Comment thread builder/dispatchers.go

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure, but can this be just original = original[7:]?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@LK4D4

LK4D4 commented Oct 21, 2014

Copy link
Copy Markdown
Contributor

LGTM

LK4D4 added a commit that referenced this pull request Oct 21, 2014
builder: handle cases where onbuild is not uppercase.
@LK4D4 LK4D4 merged commit a07ee0d into moby:master Oct 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

onbuild issues in 1.3.0

3 participants