This commit is contained in:
Neil Alexander 2024-12-13 23:12:36 +00:00
parent 657f7e0db3
commit 04be129878
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
3 changed files with 4 additions and 4 deletions

View file

@ -17,7 +17,7 @@ func chuser(input string) error {
if givenUser == "" {
return fmt.Errorf("user is empty")
}
if strings.Index(input, ":") > -1 && givenGroup == "" {
if strings.Contains(input, ":") && givenGroup == "" {
return fmt.Errorf("group is empty")
}