Implement clean deployment command

This commit is contained in:
kayomn 2022-12-20 23:33:20 +00:00
parent 2aed152bdf
commit 603bc59a88
1 changed files with 10 additions and 0 deletions

10
main.go
View File

@ -178,6 +178,16 @@ var commands = []Command{
IsVarargs: false,
Action: func(requiredArguments []string, arguments []string) (string, error) {
if len(arguments) != len(requiredArguments) {
return "", fmt.Errorf("expected %s", requiredArguments[0])
}
if gameError := WithGame(arguments[0], func(game *Game) error {
return game.CleanDeployedMods()
}); gameError != nil {
return "", gameError
}
return "cleaned", nil
},
},