[PR #2195] [MERGED] feat: correctly use the xdg library, which has the side effect to fix the config survey #2317

Closed
opened 2026-03-01 21:54:55 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/nektos/act/pull/2195
Author: @mrnossiom
Created: 2/1/2024
Status: Merged
Merged: 2/1/2024
Merged by: @cplee

Base: masterHead: fix/xdg-parent-folder-crashes-survey


📝 Commits (2)

  • 7b0fac2 feat: correctly use the xdg library, which has the side effect to fix the config survey
  • 0dfaa43 fix: use HOME config path when xdg-like path use fails

📊 Changes

1 file changed (+12 additions, -14 deletions)

View changed files

📝 cmd/root.go (+12 -14)

📄 Description

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


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/nektos/act/pull/2195 **Author:** [@mrnossiom](https://github.com/mrnossiom) **Created:** 2/1/2024 **Status:** ✅ Merged **Merged:** 2/1/2024 **Merged by:** [@cplee](https://github.com/cplee) **Base:** `master` ← **Head:** `fix/xdg-parent-folder-crashes-survey` --- ### 📝 Commits (2) - [`7b0fac2`](https://github.com/nektos/act/commit/7b0fac2f1f086e9417ae24d6b7dace95916ec30a) feat: correctly use the xdg library, which has the side effect to fix the config survey - [`0dfaa43`](https://github.com/nektos/act/commit/0dfaa431170000e60f22a2c143462cf537c82352) fix: use HOME config path when xdg-like path use fails ### 📊 Changes **1 file changed** (+12 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `cmd/root.go` (+12 -14) </details> ### 📄 Description 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 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-01 21:54:55 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#2317
No description provided.