Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VaultConfiguration#validateAndCopyVaultConfiguration exception messages do not correctly use template parameters #470

Closed
sleberknight opened this issue Dec 3, 2020 · 0 comments · Fixed by #471
Assignees
Labels
bug Something isn't working
Milestone

Comments

@sleberknight
Copy link
Member

This is a very minor issue, but the exception messages generated in VaultConfiguration#validateAndCopyVaultConfiguration don't correctly use the Guava template parameters:

// ...

checkArgument(isExistingPath(configuration.getVaultPasswordFilePath()),
        "vault password file does not exist: {}", configuration.getVaultPasswordFilePath());

// ...

checkArgument(isExistingPath(configuration.getAnsibleVaultPath()),
        "ansible-vault executable does not exist: {}", configuration.getAnsibleVaultPath());

// ...

The Guava Preconditions#checkArgument requires %s as the template parameters.

Fortunately, Guava still includes the values in the generated String, albeit at the end, e.g.

vault password file does not exist: {} [/home/ec2-user/.vault_pass.txt]

so you can still determine the file that doesn't exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant