fix: sync can be nil

This commit is contained in:
c9s 2022-05-02 11:55:40 +08:00
parent 0b39bec589
commit fa2eb87268
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -623,7 +623,7 @@ func (environ *Environment) Sync(ctx context.Context, userConfig ...*Config) err
return err
}
if len(userConfig) == 0 {
if len(userConfig) == 0 || userConfig[0].Sync == nil {
continue
}