Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exec-as will fail if username not in lowercase #30

Open
stepanselyuk opened this issue Jan 4, 2021 · 2 comments
Open

exec-as will fail if username not in lowercase #30

stepanselyuk opened this issue Jan 4, 2021 · 2 comments

Comments

@stepanselyuk
Copy link

Hello,

test "$(exec "${KUBECTL}" get po "$(whoami|tr -dc '[:alnum:]')-1" 2>/dev/null)" && container="$(whoami|tr -dc '[:alnum:]')-2" || container="$(whoami|tr -dc '[:alnum:]')-1"

Locally I modified it as:

test "$(exec "${KUBECTL}" get po "$(whoami|tr '[:upper:]' '[:lower:]'|tr -dc '[:alnum:]')-1" 2>/dev/null)" && container="$(whoami|tr '[:upper:]' '[:lower:]'|tr -dc '[:alnum:]')-2" || container="$(whoami|tr '[:upper:]' '[:lower:]'|tr -dc '[:alnum:]')-1"
@jordanwilson230
Copy link
Owner

@stepanselyuk nice catch! As soon as I have time, I'll create a PR to test and merge your change in. Thanks!

@marcomancusooutra
Copy link

This has not been fixed yet

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

No branches or pull requests

3 participants