File tree 1 file changed +6
-4
lines changed
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 {
42
42
const actualImage = this . screenshotFolder + image ;
43
43
44
44
// 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 ) => {
46
46
if ( err ) {
47
47
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' } `) ;
49
50
}
50
51
} ) ;
51
52
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 ) => {
53
54
if ( err ) {
54
55
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' } `) ;
56
58
}
57
59
} ) ;
58
60
You can’t perform that action at this time.
0 commit comments