File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -195,7 +195,7 @@ impl Info {
195
195
disabled : InfoFieldOn ,
196
196
) -> Result < Info > {
197
197
let authors = Info :: get_authors ( & dir, 3 ) ;
198
- let ( git_v, git_user) = Info :: get_git_info ( ) ;
198
+ let ( git_v, git_user) = Info :: get_git_info ( & dir ) ;
199
199
let current_commit_info = Info :: get_current_commit_info ( & dir) ?;
200
200
let config = Info :: get_configuration ( & dir) ?;
201
201
let version = Info :: get_version ( & dir) ?;
@@ -273,7 +273,7 @@ impl Info {
273
273
authors
274
274
}
275
275
276
- fn get_git_info ( ) -> ( String , String ) {
276
+ fn get_git_info ( dir : & str ) -> ( String , String ) {
277
277
let version = Command :: new ( "git" )
278
278
. arg ( "--version" )
279
279
. output ( )
@@ -282,6 +282,8 @@ impl Info {
282
282
let version = version. to_string ( ) . replace ( '\n' , "" ) ;
283
283
284
284
let username = Command :: new ( "git" )
285
+ . arg ( "-C" )
286
+ . arg ( dir)
285
287
. arg ( "config" )
286
288
. arg ( "--get" )
287
289
. arg ( "user.name" )
You can’t perform that action at this time.
0 commit comments