set stateLock to true when building meta flagSet
Any commands that use `stateLock` should have a flag to set that value, but set a failsafe to true just in case.
This commit is contained in:
parent
54aa466b74
commit
aad143b6d1
|
@ -264,6 +264,10 @@ func (m *Meta) flagSet(n string) *flag.FlagSet {
|
||||||
// Set the default Usage to empty
|
// Set the default Usage to empty
|
||||||
f.Usage = func() {}
|
f.Usage = func() {}
|
||||||
|
|
||||||
|
// command that bypass locking will supply their own flag on this var, but
|
||||||
|
// set the initial meta value to true as a failsafe.
|
||||||
|
m.stateLock = true
|
||||||
|
|
||||||
return f
|
return f
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue