mirror of
https://github.com/fosrl/newt.git
synced 2026-05-06 07:59:04 -05:00
[PR #302] [MERGED] fix: allow empty config file bootstrap before provisioning #2261
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 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:
dev← Head:fix/config-file-provision-save📝 Commits (1)
d7c3c38fix: 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.