Hammer(1): failure to expand ~/.cache when creating directory for ~/.cache/hammer_completion.yml

Problem:
hammer(1) tries to create ~/.cache to store ~/.cache/hammer_completion.yml, which is the default setting for this location. But the default value, does not undergo tilde expansion, and the mkdir(2) will create a directory call “~”, if it can (see bug report for a detail discussion).

Expected outcome: The default value should be functional and the value should undergo tilde expansion before being used.

Foreman and Proxy versions: 2.3.0

Foreman and Proxy plugin versions: 2.3.0

Distribution and version: CentOS 8.2

Other relevant data:
This issue has been reported as 31463, which has (I believe) the same underlying cause as a previous bug I raised (30639) aginst version Foreman 2.1, which details a similar problem, and other related issues as well.


Hi @illumino,

So sorry that you’ve encountered such annoying bug, but the patch is ready and the fix will be probably available [1] in the next minor release (hammer-cli 2.3.1).

Thanks for using autocompletion and sharing the issue, I hope you’ll enjoy this feature more next time :slight_smile:

[1] - https://github.com/theforeman/hammer-cli/pull/338

1 Like