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

Fix KubectlTransport::addChdir() #72

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ceesgeene
Copy link
Contributor

Overview

This pull request:

Q A
Bug fix? yes
New feature? yes
Has tests? yes
BC breaks? no
Deprecations? no

Summary

Kubectl does not support "shell scripting"; simple prepending cd before the command to be executed won´t work. Kubectl also does not provide an option to set the working dir (like docker).

This PR wraps the command to be executed in a subshell while delaying the prepending of the cd to the very last (moved to ::wrap()).

To prevent wrapping all calls in a subshell/cd this PR also introduces a new option kubectl.cd_root. When set to false, and the requested cd matches the site alias root, the command is not wrapped in the subshell and no cd call is added.

Description

Any additional information.

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.

1 participant