Skip to content

Commit

Permalink
fix(k8s): skip setMinikubeDockerEnv when vm-driver=None
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-kpyc committed Jul 4, 2019
1 parent 0d195fa commit 0825c5a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion garden-service/src/plugins/kubernetes/local/minikube.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,15 @@ import * as execa from "execa"
* TODO: it would be better to explicitly provide those to docker instead of using process.env
*/
export async function setMinikubeDockerEnv() {
const minikubeEnv = await execa.stdout("minikube", ["docker-env", "--shell=bash"])
let minikubeEnv
try {
minikubeEnv = await execa.stdout("minikube", ["docker-env", "--shell=bash"])
} catch (err) {
if (err.contains("driver does not support")) {
return;
}
throw err;
}
for (const line of minikubeEnv.split("\n")) {
const matched = line.match(/^export (\w+)="(.+)"$/)
if (matched) {
Expand Down

0 comments on commit 0825c5a

Please sign in to comment.