hauleth / erlang-systemd

systemd utilities for Erlang applications
Apache License 2.0
174 stars 19 forks source link

ft: helper function for accessing credentials directory #42

Open hauleth opened 3 months ago

hauleth commented 3 months ago

This adds new function systemd:credentials/1 which returns path for credentials' files. This function checks if the $CREDENTIALS_DIRECTORY variable was set and if it was set, then the path is always returned. It is left up to the user to check if the file is existing and/or correct one.

Close #41

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Project coverage is 88.59%. Comparing base (aaf56f1) to head (9c48aaf). Report is 2 commits behind head on master.

Files Patch % Lines
src/systemd.erl 0.00% 3 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #42 +/- ## ========================================== - Coverage 89.30% 88.59% -0.72% ========================================== Files 8 8 Lines 374 377 +3 ========================================== Hits 334 334 - Misses 40 43 +3 ``` | [Flag](https://app.codecov.io/gh/hauleth/erlang-systemd/pull/42/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=%C5%81ukasz+Jan+Niemier) | Coverage Δ | | |---|---|---| | [otp-24](https://app.codecov.io/gh/hauleth/erlang-systemd/pull/42/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=%C5%81ukasz+Jan+Niemier) | `88.59% <0.00%> (-0.72%)` | :arrow_down: | | [otp-25](https://app.codecov.io/gh/hauleth/erlang-systemd/pull/42/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=%C5%81ukasz+Jan+Niemier) | `88.59% <0.00%> (-0.72%)` | :arrow_down: | | [otp-26](https://app.codecov.io/gh/hauleth/erlang-systemd/pull/42/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=%C5%81ukasz+Jan+Niemier) | `88.59% <0.00%> (-0.72%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=%C5%81ukasz+Jan+Niemier#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.