Skip to content

Commit c8302b3

Browse files
committed
Bail if we're root
1 parent 911e71a commit c8302b3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

main.go

+5
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ func setDefault(identifier string) error {
3838
return fmt.Errorf("identifier cannot be empty")
3939
}
4040

41+
// Todo: actually run as the logged in user if run as root. For now just bail
42+
if os.Geteuid() == 0 {
43+
return fmt.Errorf("this tool must be run as the logged in user")
44+
}
45+
4146
c, err := client.NewClient()
4247
if err != nil {
4348
return err

0 commit comments

Comments
 (0)