File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -9,21 +9,22 @@ import { ProgressEvent } from './types/version-bump-progress'
9
9
* Updates the version number in the specified files.
10
10
*/
11
11
export async function updateFiles ( operation : Operation ) : Promise < Operation > {
12
- const { files } = operation . options
12
+ const { files, cwd } = operation . options
13
13
14
14
for ( const relPath of files ) {
15
15
const modified = await updateFile ( relPath , operation )
16
+ const absPath = path . resolve ( cwd , relPath )
16
17
17
18
if ( modified ) {
18
19
operation . update ( {
19
20
event : ProgressEvent . FileUpdated ,
20
- updatedFiles : operation . state . updatedFiles . concat ( relPath ) ,
21
+ updatedFiles : operation . state . updatedFiles . concat ( absPath ) ,
21
22
} )
22
23
}
23
24
else {
24
25
operation . update ( {
25
26
event : ProgressEvent . FileSkipped ,
26
- skippedFiles : operation . state . skippedFiles . concat ( relPath ) ,
27
+ skippedFiles : operation . state . skippedFiles . concat ( absPath ) ,
27
28
} )
28
29
}
29
30
}
You can’t perform that action at this time.
0 commit comments