[PR #701] [MERGED] Allow to create config file next to binary #12889

Closed
opened 2026-08-05 02:06:55 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/701
Author: @pappz
Created: 2/22/2023
Status: Merged
Merged: 2/28/2023
Merged by: @mlsmaycon

Base: mainHead: fix-config-file


📝 Commits (3)

  • 47eaf21 Allow to create config file next to binary
  • 93ffc0d Force to use the proper temp dir
  • d4476de Add test

📊 Changes

2 files changed (+35 additions, -5 deletions)

View changed files

📝 util/file.go (+11 -2)
📝 util/file_test.go (+24 -3)

📄 Description

Describe your changes

Without you set the full path of the config file the Netbird can not
handle it. We check the path of the given config file's name and
if it is not contain a folder then skip the step to create a folder
for it.
You can place the config file next to the binary:
./netbird up --config myconfig.json

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary

🔄 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/netbirdio/netbird/pull/701 **Author:** [@pappz](https://github.com/pappz) **Created:** 2/22/2023 **Status:** ✅ Merged **Merged:** 2/28/2023 **Merged by:** [@mlsmaycon](https://github.com/mlsmaycon) **Base:** `main` ← **Head:** `fix-config-file` --- ### 📝 Commits (3) - [`47eaf21`](https://github.com/netbirdio/netbird/commit/47eaf2126eb8ab41f125050123ab7ca6f0ec01c3) Allow to create config file next to binary - [`93ffc0d`](https://github.com/netbirdio/netbird/commit/93ffc0d1ed38a2f8a6806a442d21c7c1c9d38e59) Force to use the proper temp dir - [`d4476de`](https://github.com/netbirdio/netbird/commit/d4476de2a6f069d59a8bf1a0d112ecfcd9f36859) Add test ### 📊 Changes **2 files changed** (+35 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `util/file.go` (+11 -2) 📝 `util/file_test.go` (+24 -3) </details> ### 📄 Description ## Describe your changes Without you set the full path of the config file the Netbird can not handle it. We check the path of the given config file's name and if it is not contain a folder then skip the step to create a folder for it. You can place the config file next to the binary: **./netbird up --config myconfig.json** ## Issue ticket number and link ### Checklist - [x] Is it a bug fix - [ ] Is a typo/documentation fix - [x] Is a feature enhancement - [ ] It is a refactor - [ ] Created tests that fail without the change (if possible) - [ ] Extended the README / documentation, if necessary --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2026-08-05 02:06:55 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#12889