Skip to content

Commit 6ab9c0a

Browse files
committed
feat: log warning when experimental features are enabled
1 parent 4aa05ae commit 6ab9c0a

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

cmd/tinyauth/tinyauth.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package main
33
import (
44
"fmt"
55
"os"
6+
"reflect"
67
"strings"
78

89
"charm.land/huh/v2"
@@ -31,6 +32,10 @@ func main() {
3132
Configuration: tConfig,
3233
Resources: loaders,
3334
Run: func(_ []string) error {
35+
if !reflect.DeepEqual(model.NewDefaultConfiguration(env).Experimental, tConfig.Experimental) {
36+
colors := getColors()
37+
fmt.Println(colors.yellow.Render("⚠") + " Experimental features are enabled, use with caution. Experimental features may change with each release.")
38+
}
3439
return runCmd(*tConfig)
3540
},
3641
}

0 commit comments

Comments
 (0)