refs #2647 improve error message #121

Merged
nserrano merged 1 commits from getgitdata-misleading-error into main 2025-09-12 14:51:08 +02:00
2 changed files with 9 additions and 1 deletions

View File

@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.5.2] - 2025-09-12
### Fixed
- Improved error message
## [1.5.1] - 2025-09-12
### Fixed

View File

@ -24,7 +24,9 @@ mntpt = ogMount (dsk, par)
git_dir = f'{mntpt}/.git'
if not os.path.exists (git_dir):
ogRaiseError (['log', 'session'], ogGlobals.OG_ERR_FORMAT, f'"{git_dir}" no existe')
if os.path.islink (git_dir): err_msg = f'"{git_dir}" apunta a un destino que no existe'
else: err_msg = f'"{git_dir}" no existe'
ogRaiseError (['log', 'session'], ogGlobals.OG_ERR_FORMAT, err_msg)
sys.exit (1)
p = subprocess.run (['git', '--git-dir', git_dir, 'branch', '--show-current'], capture_output=True, text=True)