File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -42,17 +42,19 @@ class ResembleHelper extends Helper {
4242 const actualImage = this . screenshotFolder + image ;
4343
4444 // check whether the base and the screenshot images are present.
45- fs . access ( baseImage , fs . constants . F_OK | fs . constants . W_OK , ( err ) => {
45+ fs . access ( baseImage , fs . constants . F_OK | fs . constants . R_OK , ( err ) => {
4646 if ( err ) {
4747 throw new Error (
48- `${ baseImage } ${ err . code === 'ENOENT' ? 'base image does not exist' : 'is read-only' } ` ) ;
48+ `${ baseImage } ${ err . code === 'ENOENT' ? 'base image does not exist' :
49+ 'base image has an access error' } `) ;
4950 }
5051 } ) ;
5152
52- fs . access ( actualImage , fs . constants . F_OK | fs . constants . W_OK , ( err ) => {
53+ fs . access ( actualImage , fs . constants . F_OK | fs . constants . R_OK , ( err ) => {
5354 if ( err ) {
5455 throw new Error (
55- `${ actualImage } ${ err . code === 'ENOENT' ? 'screenshot image does not exist' : 'is read-only' } ` ) ;
56+ `${ actualImage } ${ err . code === 'ENOENT' ? 'screenshot image does not exist' :
57+ 'screenshot image has an access error' } `) ;
5658 }
5759 } ) ;
5860
You can’t perform that action at this time.
0 commit comments