bugfix: prevent commits on environments
This commit is contained in:
@@ -15,6 +15,15 @@ def commit():
|
||||
base.ensure_initialized()
|
||||
branch = base.ensure_right_branch()
|
||||
|
||||
# Una rama WIP termina squasheando en su rama original, que tampoco puede ser un entorno
|
||||
target_branch = branch.removeprefix(WIP_BRANCH_PREFIX)
|
||||
|
||||
if target_branch in base.environments:
|
||||
raise GitFlowError(
|
||||
f"No se puede commitear directamente sobre el entorno '{target_branch}'. "
|
||||
"Debe crear una rama de trabajo con el comando `new`."
|
||||
)
|
||||
|
||||
if not _has_files_staged():
|
||||
base.io_warning("No hay cambios en el indice para commitear.")
|
||||
if base.io_confirm("¿Desea agregar la carpeta actual?"):
|
||||
|
||||
Reference in New Issue
Block a user