mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Add __cli opt
Allows us to know what CLI command we are operating under. Especially useful for detecting uses of salt-call
This commit is contained in:
parent
0fa094ae11
commit
a2408157de
1 changed files with 2 additions and 0 deletions
|
@ -1979,6 +1979,8 @@ def apply_minion_config(overrides=None,
|
|||
if overrides:
|
||||
opts.update(overrides)
|
||||
|
||||
opts['__cli'] = os.path.basename(sys.argv[0])
|
||||
|
||||
if len(opts['sock_dir']) > len(opts['cachedir']) + 10:
|
||||
opts['sock_dir'] = os.path.join(opts['cachedir'], '.salt-unix')
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue