mirror of
https://github.com/clearlinux/docker.git
synced 2026-08-20 04:36:37 +00:00
Merge pull request #4428 from vieux/add_warning_flags
add warning for deprecatd flags
This commit is contained in:
@@ -803,6 +803,11 @@ func (f *FlagSet) parseOne() (bool, string, error) {
|
||||
f.actual = make(map[string]*Flag)
|
||||
}
|
||||
f.actual[name] = flag
|
||||
for _, n := range flag.Names {
|
||||
if n == fmt.Sprintf("#%s", name) {
|
||||
fmt.Fprintf(f.out(), "Warning: '-%s' is deprecated, it will be removed soon. See usage.\n", name)
|
||||
}
|
||||
}
|
||||
return true, "", nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user