forked from toolshed/abra
fix: Throws an error when trying to deploy unstaged changes version
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
package recipe
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
@ -67,6 +68,9 @@ func (r Recipe) EnsureExists() error {
|
||||
|
||||
// EnsureVersion checks whether a specific version exists for a recipe.
|
||||
func (r Recipe) EnsureVersion(version string) (bool, error) {
|
||||
if strings.Contains(version, "+ unstaged changes") {
|
||||
return true, errors.New("A chaos version is configured. \nMaybe your coworker deployed a local version of the recipe?\nOr did you forget to add --chaos?")
|
||||
}
|
||||
isChaosCommit := false
|
||||
|
||||
if err := gitPkg.EnsureGitRepo(r.Dir); err != nil {
|
||||
|
Reference in New Issue
Block a user