lens
lens copied to clipboard
.bash_set_path usage with user defined kubectl binary
Describe the bug the ".bash_profile" is not sourced if I use my own kubectl binary. Example: I do have function 'promptModification' in .bashrc that is sourced from .bash_profile. When I open terminal in Lens is says
bash: promptModification: command not found bash-3.2$
To Reproduce Steps to reproduce the behavior:
- Define the function 'promptModification' and set 'export PROMPT_COMMAND=promptModification' in .bashrc
- Ensure .bashrc is sourced from .bash_profile
- Open Lens
- Go to 'Preference->Kubernetes'
- Switch off "Download kubectl binaries matching the Kubernetes cluster version"
- Point to own kubectl binary at "PATH TO KUBECTL BINARY"
- Click "Esc" (Close preference pane)
- Open any connected K8S cluster (click cluster on left hotbar)
- Click "+" -> "Terminal session" at bottom of window
- See error
Expected behavior Using own kubectl binary should not stop the sourcing the .${SHELL}_profile in terminal session.
Screenshots no screenshots.
Environment (please complete the following information):
- Lens Version: 5.2.5-latest.20211001.2
- OS: MacOS Big Sur (11.6)
- Installation method (e.g. snap or AppImage in Linux): Homebrew
Logs: When you run the application executable from command line you will see some logging output. Please paste them here:
debug: ▪ Set kubectl version 1.20.8 for cluster version v1.20.1-mirantis-1-3-g71afa0ba032bfd using version map +9s
error: ┏ undefined +349ms
error: ┃ [1] {
error: ┃ [2] errno: -2,
error: ┃ [3] code: 'ENOENT',
error: ┃ [4] syscall: 'open',
error: ┃ [5] path: '/Users/<>/Library/Application Support/Lens/binaries/kubectl/1.20.8/.bash_set_path'
error: ┗ [6] }
Kubeconfig: not related to kubeconfig
Additional context no additional context
I cannot reproduce it. I thought I had initially but it was because I had misspelled the name of the function declaration in my .bashrc