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

fix: changed location of actrc in info message #2373

Merged
merged 3 commits into from
Jul 10, 2024

Conversation

just-dev-creator
Copy link
Contributor

Hi there,
when trying to switch the docker image used for one of my projects, I noticed that the .actrc file is not in the path stated during setup (~/.actrc), but rather in ~/.config/act/actrc. I changed the info text accordingly.
I hope this isn't some special thing when using act via the AUR or something like that, but at least for me it took some minutes to find the correct config.
If this issue is specific to me, please just close this PR - I certainly don't have enough knowledge of Go to find the code part that creates the config and investigate further.

@just-dev-creator just-dev-creator requested a review from a team as a code owner June 21, 2024 20:14
@ChristopherHX
Copy link
Contributor

That path got os dependent since an outside contributor changed the preference order and now we are here at the side effects

We should put the actual filepath used for writing instead of hardcoding an now os dependent value.

should be the result of configLocations()[0], but please check for len >= 1 to make this never crash

act --bug-report has always shown the whole list of config locations which were created by either by hand or automatically

@just-dev-creator
Copy link
Contributor Author

just-dev-creator commented Jun 21, 2024

Perfect, I will try to copy the functionality of the bug-report command to this info message. Thank you very much for your near-instant reply.

Copy link

codecov bot commented Jun 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.59%. Comparing base (5a80a04) to head (3ada0d7).
Report is 89 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #2373       +/-   ##
===========================================
+ Coverage   61.56%   76.59%   +15.03%     
===========================================
  Files          53       61        +8     
  Lines        9002     7893     -1109     
===========================================
+ Hits         5542     6046      +504     
+ Misses       3020     1292     -1728     
- Partials      440      555      +115     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@ChristopherHX ChristopherHX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok yes the condition for config locations is not needed as all callers enshures this is never called when it has no entries

@mergify mergify bot merged commit a1a96da into nektos:master Jul 10, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants