mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Test NO_PROXY is not empty on init scripts
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
parent
147f43c6a0
commit
09bcb57f04
@ -283,7 +283,9 @@ export class Kubectl {
|
|||||||
bashScript += "fi\n"
|
bashScript += "fi\n"
|
||||||
bashScript += `export PATH="${helmPath}:${kubectlPath}:$PATH"\n`
|
bashScript += `export PATH="${helmPath}:${kubectlPath}:$PATH"\n`
|
||||||
bashScript += "export KUBECONFIG=\"$tempkubeconfig\"\n"
|
bashScript += "export KUBECONFIG=\"$tempkubeconfig\"\n"
|
||||||
bashScript += "if [ \"$NO_PROXY\" != \"localhost,127.0.0.1\" ]; then\n"
|
bashScript += "if [ -z \"$NO_PROXY\" ]; then\n"
|
||||||
|
bashScript += " export NO_PROXY=\"localhost,127.0.0.1\"\n"
|
||||||
|
bashScript += "elif [ \"$NO_PROXY\" != \"localhost,127.0.0.1\" ]; then\n"
|
||||||
bashScript += " export NO_PROXY=\"localhost,127.0.0.1,$NO_PROXY\"\n"
|
bashScript += " export NO_PROXY=\"localhost,127.0.0.1,$NO_PROXY\"\n"
|
||||||
bashScript += "fi\n"
|
bashScript += "fi\n"
|
||||||
bashScript += "unset tempkubeconfig\n"
|
bashScript += "unset tempkubeconfig\n"
|
||||||
@ -311,7 +313,9 @@ export class Kubectl {
|
|||||||
zshScript += "d=${d/#:/}\n"
|
zshScript += "d=${d/#:/}\n"
|
||||||
zshScript += "export PATH=\"$helmpath:$kubectlpath:${d/%:/}\"\n"
|
zshScript += "export PATH=\"$helmpath:$kubectlpath:${d/%:/}\"\n"
|
||||||
zshScript += "export KUBECONFIG=\"$tempkubeconfig\"\n"
|
zshScript += "export KUBECONFIG=\"$tempkubeconfig\"\n"
|
||||||
zshScript += "if [ \"$NO_PROXY\" != \"localhost,127.0.0.1\" ]; then\n"
|
zshScript += "if test -z \"$NO_PROXY\"; then\n"
|
||||||
|
zshScript += " export NO_PROXY=\"localhost,127.0.0.1\"\n"
|
||||||
|
zshScript += "elif [ \"$NO_PROXY\" != \"localhost,127.0.0.1\" ]; then\n"
|
||||||
zshScript += " export NO_PROXY=\"localhost,127.0.0.1,$NO_PROXY\"\n"
|
zshScript += " export NO_PROXY=\"localhost,127.0.0.1,$NO_PROXY\"\n"
|
||||||
zshScript += "fi\n"
|
zshScript += "fi\n"
|
||||||
zshScript += "unset tempkubeconfig\n"
|
zshScript += "unset tempkubeconfig\n"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user