prevent panic when empty flag
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
This commit is contained in:
parent
40f159f045
commit
d18d9ffeaa
1 changed files with 3 additions and 0 deletions
|
@ -778,6 +778,9 @@ func (f *FlagSet) usage() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func trimQuotes(str string) string {
|
func trimQuotes(str string) string {
|
||||||
|
if len(str) == 0 {
|
||||||
|
return str
|
||||||
|
}
|
||||||
type quote struct {
|
type quote struct {
|
||||||
start, end byte
|
start, end byte
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue