Implement clean deployment command
This commit is contained in:
parent
2aed152bdf
commit
603bc59a88
10
main.go
10
main.go
|
@ -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
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue