Fix pluralisation on response from installing mods

This commit is contained in:
kayomn 2022-12-22 01:39:41 +00:00
parent e04c978488
commit cde4b75c5d
1 changed files with 14 additions and 4 deletions

12
main.go
View File

@ -44,13 +44,23 @@ var commands = []Command{
}
}()
for _, archivePath := range providedArguments[1:] {
var archivePaths = providedArguments[1:]
if len(archivePaths) > 1 {
for _, archivePath := range archivePaths {
if installError := game.InstallMod(archivePath); installError != nil {
return "", installError
}
}
return "mods installed", nil
}
if installError := game.InstallMod(archivePaths[0]); installError != nil {
return "", installError
}
return "mod installed", nil
},
},