mirror of
https://github.com/vbatts/go-mtree.git
synced 2025-07-13 18:29:11 +00:00
go*: update modules
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
parent
d54530a564
commit
4fdc2fd3ed
121 changed files with 9984 additions and 4436 deletions
11
vendor/github.com/urfave/cli/v2/flag_path.go
generated
vendored
11
vendor/github.com/urfave/cli/v2/flag_path.go
generated
vendored
|
@ -33,10 +33,14 @@ func (f *PathFlag) GetDefaultText() string {
|
|||
if f.DefaultText != "" {
|
||||
return f.DefaultText
|
||||
}
|
||||
if f.defaultValue == "" {
|
||||
return f.defaultValue
|
||||
val := f.Value
|
||||
if f.defaultValueSet {
|
||||
val = f.defaultValue
|
||||
}
|
||||
return fmt.Sprintf("%q", f.defaultValue)
|
||||
if val == "" {
|
||||
return val
|
||||
}
|
||||
return fmt.Sprintf("%q", val)
|
||||
}
|
||||
|
||||
// GetEnvVars returns the env vars for this flag
|
||||
|
@ -48,6 +52,7 @@ func (f *PathFlag) GetEnvVars() []string {
|
|||
func (f *PathFlag) Apply(set *flag.FlagSet) error {
|
||||
// set default value so that environment wont be able to overwrite it
|
||||
f.defaultValue = f.Value
|
||||
f.defaultValueSet = true
|
||||
|
||||
if val, _, found := flagFromEnvOrFile(f.EnvVars, f.FilePath); found {
|
||||
f.Value = val
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue