@@ -105,7 +105,7 @@ function isAtRepoRoot(repositoryPath: string): boolean {
105105function getCurrentDirectory ( repositoryPath : string ) : string {
106106 const cwd = process . cwd ( ) ;
107107 if ( cwd === repositoryPath ) return '' ;
108- return cwd . replace ( repositoryPath , '' ) . replace ( / ^ \/ / , '' ) + '/' ;
108+ return ` ${ cwd . replace ( repositoryPath , '' ) . replace ( / ^ \/ / , '' ) } /` ;
109109}
110110
111111/**
@@ -226,7 +226,7 @@ function formatChangedFilesMode(
226226 changedFiles : string [ ] ,
227227 fileOwners : Map < string , { owner : string ; commits : number ; lastActive : Date | null } > ,
228228 currentUser : string ,
229- repositoryPath : string
229+ _repositoryPath : string
230230) : string {
231231 let output = '' ;
232232 output += chalk . bold ( '📝 Modified files' ) + chalk . gray ( ` (${ changedFiles . length } ):\n` ) ;
@@ -340,7 +340,7 @@ function formatSubdirectoryMode(
340340) : string {
341341 // Filter developers to only those with files in current directory
342342 const relevantDevs = developers . filter ( ( dev ) =>
343- dev . topFiles . some ( ( f ) => f . path . startsWith ( repositoryPath + '/' + currentDir ) )
343+ dev . topFiles . some ( ( f ) => f . path . startsWith ( ` ${ repositoryPath } / ${ currentDir } ` ) )
344344 ) ;
345345
346346 if ( relevantDevs . length === 0 ) {
@@ -358,7 +358,7 @@ function formatSubdirectoryMode(
358358
359359 // Show top files in this directory
360360 const filesInDir = primary . topFiles
361- . filter ( ( f ) => f . path . startsWith ( repositoryPath + '/' + currentDir ) )
361+ . filter ( ( f ) => f . path . startsWith ( ` ${ repositoryPath } / ${ currentDir } ` ) )
362362 . slice ( 0 , 5 ) ;
363363
364364 if ( filesInDir . length > 0 ) {
@@ -470,7 +470,7 @@ export const ownersCommand = new Command('owners')
470470 > ( ) ;
471471 for ( const dev of developers ) {
472472 for ( const fileData of dev . topFiles ) {
473- const relativePath = fileData . path . replace ( repositoryPath + '/' , '' ) ;
473+ const relativePath = fileData . path . replace ( ` ${ repositoryPath } /` , '' ) ;
474474 if ( ! fileOwners . has ( relativePath ) ) {
475475 fileOwners . set ( relativePath , {
476476 owner : dev . displayName ,
0 commit comments