knative / build-templates

A library of build templates.
Apache License 2.0
184 stars 68 forks source link

Unset IFS to avoid quoting issues #81

Closed philippthun closed 5 years ago

philippthun commented 5 years ago

When executing the ecr_helper.sh (on Ubuntu 18.04 with GNU bash version 4.4.19(1)-release) we get an error due to quoting issues caused by manipulating the Internal Field Separator:

$ ecr_helper.sh ecr-test ecr-service-account
Error: unknown command " -n ecr-test" for "kubectl"
Run 'kubectl --help' for usage.
unknown command " -n ecr-test" for "kubectl"

To fix this issue, we simply unset IFS as soon as username and password have been parsed from the token.

philippthun commented 5 years ago

@ImJasonH - As this PR has been reviewed and approved by @evankanderson, would it be possible to merge it? Or is something missing from your point of view?

knative-prow-robot commented 5 years ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: evankanderson, ImJasonH, philippthun

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/knative/build-templates/blob/master/OWNERS)~~ [ImJasonH] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
philippthun commented 5 years ago

/retest

knative-prow-robot commented 5 years ago

@philippthun: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to [this](https://github.com/knative/build-templates/pull/81#issuecomment-458351869): >/retest Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
evankanderson commented 5 years ago

/ok-to-test

On Mon, Jan 28, 2019, 4:01 PM Knative Prow Robot notifications@github.com wrote:

@philippthun https://github.com/philippthun: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this https://github.com/knative/build-templates/pull/81#issuecomment-458351869 :

/retest

Instructions for interacting with me using PR comments are available here https://git.k8s.io/community/contributors/guide/pull-requests.md. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue: repository.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/knative/build-templates/pull/81#issuecomment-458351994, or mute the thread https://github.com/notifications/unsubscribe-auth/AHlyN8YDduMOD_2k452kgABc9m9m-VXeks5vH49TgaJpZM4ZGgff .