-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add "configtest" CLI command. (#1230)
Co-authored-by: Kristoffer Dalby <kristoffer@dalby.cc> Fixes #1229
- Loading branch information
1 parent
2baeb79
commit f49930c
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,8 @@ | |
|
||
### changes | ||
|
||
- Adding "configtest" CLI command. | ||
|
||
## 0.20.0 (2023-02-03) | ||
|
||
### changes | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package cli | ||
|
||
import ( | ||
"github.com/spf13/cobra" | ||
"github.com/rs/zerolog/log" | ||
) | ||
|
||
func init() { | ||
rootCmd.AddCommand(configTestCmd) | ||
} | ||
|
||
var configTestCmd = &cobra.Command{ | ||
Use: "configtest", | ||
Short: "Test the configuration.", | ||
Long: "Run a test of the configuration and exit.", | ||
Run: func(cmd *cobra.Command, args []string) { | ||
_, err := getHeadscaleApp() | ||
if err != nil { | ||
log.Fatal().Caller().Err(err).Msg("Error initializing") | ||
} | ||
}, | ||
} |