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

feat: correctly use the xdg library, which has the side effect to fix the config survey #2195

Merged
merged 2 commits into from Feb 1, 2024

Conversation

mrnossiom
Copy link
Contributor

Fixes: #2193

It worked before my PR merge commit, and does not after... I guess it's my fault 😄.

Fix

The os.Create call in defaultImageSurvey errors in case we could not create the file, like in the situation the parent folder wasn't created.

Also configLocations would set actrcXdg only if a file was actually found. So the path would be empty on first launch.

Instead of manually creating the parent folder, I went the way of modifying configLocations to include the correct xdg lib calls that takes cares of creating the folder and returning the right path.

Thanks and sorry again

@mrnossiom mrnossiom requested a review from a team as a code owner February 1, 2024 19:53
cmd/root.go Outdated Show resolved Hide resolved
Copy link
Contributor

mergify bot commented Feb 1, 2024

@mrnossiom this pull request has failed checks 🛠

@mergify mergify bot added the needs-work Extra attention is needed label Feb 1, 2024
@mrnossiom
Copy link
Contributor Author

CI doesn't pass due to unrelated 404 hit in Codecov action

cmd/root.go Outdated Show resolved Hide resolved
@mrnossiom mrnossiom force-pushed the fix/xdg-parent-folder-crashes-survey branch from 5a27192 to 0dfaa43 Compare February 1, 2024 20:24
Copy link

codecov bot commented Feb 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (5a80a04) 61.56% compared to head (0dfaa43) 61.56%.
Report is 7 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2195   +/-   ##
=======================================
  Coverage   61.56%   61.56%           
=======================================
  Files          53       53           
  Lines        9002     9002           
=======================================
  Hits         5542     5542           
  Misses       3020     3020           
  Partials      440      440           

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

@mergify mergify bot removed the needs-work Extra attention is needed label Feb 1, 2024
@mergify mergify bot requested a review from a team February 1, 2024 20:37
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.

Windows is fixed

@ChristopherHX
Copy link
Contributor

@cplee we should merge this and create a new release.

Every new user of act is currently affeced by #2193

@cplee cplee merged commit 12c0c42 into nektos:master Feb 1, 2024
8 checks passed
@mrnossiom mrnossiom deleted the fix/xdg-parent-folder-crashes-survey branch February 1, 2024 22:11
jmikedupont2 pushed a commit to meta-introspector/act that referenced this pull request Mar 10, 2024
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.

Crash on version 0.2.58 with "open : no such file or directory"
3 participants