File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -26,10 +26,16 @@ pub struct Head {
2626
2727///
2828pub fn repo_open_error ( repo_path : & RepoPath ) -> Option < String > {
29- Repository :: open_ext (
29+ if let Err ( e ) = Repository :: open_ext (
3030 repo_path. gitpath ( ) ,
3131 RepositoryOpenFlags :: FROM_ENV ,
3232 Vec :: < & Path > :: new ( ) ,
33+ ) {
34+ return Some ( e. to_string ( ) ) ;
35+ }
36+
37+ gix:: ThreadSafeRepository :: discover_with_environment_overrides (
38+ repo_path. gitpath ( ) ,
3339 )
3440 . map_or_else ( |e| Some ( e. to_string ( ) ) , |_| None )
3541}
Original file line number Diff line number Diff line change @@ -355,8 +355,8 @@ fn draw(terminal: &mut Terminal, app: &App) -> io::Result<()> {
355355fn ensure_valid_path ( repo_path : & RepoPath ) -> Result < ( ) > {
356356 match asyncgit:: sync:: repo_open_error ( repo_path) {
357357 Some ( e) => {
358- log:: error!( "{e}" ) ;
359- bail ! ( e )
358+ log:: error!( "invalid repo path: {e}" ) ;
359+ bail ! ( "invalid repo path: {e}" )
360360 }
361361 None => Ok ( ( ) ) ,
362362 }
You can’t perform that action at this time.
0 commit comments