minikube-build-tools-for-java icon indicating copy to clipboard operation
minikube-build-tools-for-java copied to clipboard

Warn user or auto-split flags with space

Open coollog opened this issue 7 years ago • 4 comments

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.

coollog avatar Oct 09 '17 15:10 coollog

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

loosebazooka avatar Oct 09 '17 15:10 loosebazooka

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"]
}

coollog avatar Oct 09 '17 16:10 coollog

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

loosebazooka avatar Oct 09 '17 17:10 loosebazooka

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.

coollog avatar Oct 09 '17 17:10 coollog