[PR #302] [MERGED] fix: allow empty config file bootstrap before provisioning #1341

Closed
opened 2026-04-22 01:05:30 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/fosrl/newt/pull/302
Author: @LaurenceJJones
Created: 4/8/2026
Status: Merged
Merged: 4/9/2026
Merged by: @oschwartz10612

Base: devHead: fix/config-file-provision-save


📝 Commits (1)

  • d7c3c38 fix: allow empty config file bootstrap before provisioning

📊 Changes

2 files changed (+40 additions, -0 deletions)

View changed files

📝 websocket/config.go (+5 -0)
websocket/config_test.go (+35 -0)

📄 Description

Community Contribution License Agreement

By creating this pull request, I grant the project maintainers an unlimited,
perpetual license to use, modify, and redistribute these contributions under any terms they
choose, including both the AGPLv3 and the Fossorial Commercial license terms. I
represent that I have the right to grant this license for all contributed content.

Description

Treat an empty CONFIG_FILE as initial state instead of failing JSON parse, so provisioning can proceed and credentials can be saved. Ref: fosrl/pangolin#2812

How to test?

Having an empty json file shouldnt throw a unmarshal error since the file is empty it could be a user emptied it or scaffold an empty file to mount to a container.


🔄 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/fosrl/newt/pull/302 **Author:** [@LaurenceJJones](https://github.com/LaurenceJJones) **Created:** 4/8/2026 **Status:** ✅ Merged **Merged:** 4/9/2026 **Merged by:** [@oschwartz10612](https://github.com/oschwartz10612) **Base:** `dev` ← **Head:** `fix/config-file-provision-save` --- ### 📝 Commits (1) - [`d7c3c38`](https://github.com/fosrl/newt/commit/d7c3c38d2417270074b4d1cc957779098ceaa8a9) fix: allow empty config file bootstrap before provisioning ### 📊 Changes **2 files changed** (+40 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `websocket/config.go` (+5 -0) ➕ `websocket/config_test.go` (+35 -0) </details> ### 📄 Description ## Community Contribution License Agreement By creating this pull request, I grant the project maintainers an unlimited, perpetual license to use, modify, and redistribute these contributions under any terms they choose, including both the AGPLv3 and the Fossorial Commercial license terms. I represent that I have the right to grant this license for all contributed content. ## Description Treat an empty CONFIG_FILE as initial state instead of failing JSON parse, so provisioning can proceed and credentials can be saved. Ref: fosrl/pangolin#2812 ## How to test? Having an empty json file shouldnt throw a unmarshal error since the file is empty it could be a user emptied it or scaffold an empty file to mount to a container. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-22 01:05:30 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/newt#1341