mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Merge pull request #19555 from cachedout/check_cwd
Check cwd before running saltcmd
This commit is contained in:
commit
783de9584a
@ -1458,6 +1458,10 @@ class SaltCMDOptionParser(OptionParser, ConfigDirMixIn, MergeConfigMixIn,
|
||||
_default_logging_level_ = 'warning'
|
||||
_default_logging_logfile_ = os.path.join(syspaths.LOGS_DIR, 'master')
|
||||
_loglevel_config_setting_name_ = 'cli_salt_log_file'
|
||||
try:
|
||||
os.getcwd()
|
||||
except OSError:
|
||||
sys.exit("Cannot access current working directory. Exiting!")
|
||||
|
||||
def _mixin_setup(self):
|
||||
self.add_option(
|
||||
|
Loading…
Reference in New Issue
Block a user