GoogleContainerTools / minikube-build-tools-for-java

Minikube lifecycle management tools for Gradle and Maven.
Apache License 2.0
57 stars 27 forks source link

Warn user or auto-split flags with space #19

Open coollog opened 7 years ago

coollog commented 7 years ago

If the user uses a flag with a space in it, like:

minikubeStart {
  flags = ["--vm-driver none"]
}

The CommandExecutor will fail to run this command because the space is escaped (it will run minikube start --vm-driver\ none).

We can resolve this by warning the user that they have a space in the flag or by automatically splitting this into two parts for the command list.

loosebazooka commented 7 years ago

what if they want a flag parameter with spaces in it? Are you tracking with --?

coollog commented 7 years ago

Currently, if they want a flag parameter with spaces in it, they would have to split up the parameter, like:

minikubeStart {
  flags = ["--vm-driver", "none"]
}
loosebazooka commented 7 years ago

oh right, but I mean flags = ["--vm-driver", "my vm driver"] <- auto escaping is a feature in this case

coollog commented 7 years ago

Yes, that should remain as a feature. Not sure what the best way to approach this may be. Maybe when executing a command, we can log it with the escape symbols, so like:

Instead of: Running command : minikube --vm-driver none We have: Running command : minikube --vm-driver\ none

This is just a small ux improvement though.