Problem
When --config is passed a file that does not exist, elm falls through to a
generic credentials error:
Error: access_id, access_key or account_name not set via cli or config file
Default config file: /home/user/.config/logicmonitor/credentials/config.ini
This is misleading — the user passed an explicit path and the real problem is
that the file was not found, not that credentials are missing.
Expected behaviour
A clear error pointing at the missing file, similar to what --profile does:
Error: config file not found: /home/user/.config/logicmonitor/credentials/bob.ini
Notes
- This is a
click_config_file behaviour — it silently ignores a missing config
file rather than erroring.
- Fix likely belongs in
_capture_config_path callback in _jnja/elm.py.j2:
check os.path.exists(value) and exit with a clear message if not.
--profile already does this correctly for its resolved path.
🤖 Generated with Claude Code
Problem
When
--configis passed a file that does not exist, elm falls through to ageneric credentials error:
This is misleading — the user passed an explicit path and the real problem is
that the file was not found, not that credentials are missing.
Expected behaviour
A clear error pointing at the missing file, similar to what
--profiledoes:Notes
click_config_filebehaviour — it silently ignores a missing configfile rather than erroring.
_capture_config_pathcallback in_jnja/elm.py.j2:check
os.path.exists(value)and exit with a clear message if not.--profilealready does this correctly for its resolved path.🤖 Generated with Claude Code