0
0
forked from toolshed/abra

fix: Throws an error when trying to deploy unstaged changes version

This commit is contained in:
2024-12-30 15:48:30 +01:00
parent b6573720ec
commit 124a91c67f
2 changed files with 15 additions and 0 deletions

View File

@ -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 {