File tree 2 files changed +5
-2
lines changed
2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -133,6 +133,7 @@ const getCompareSnapshotsPlugin = on => {
133
133
on ( 'after:screenshot' , details => {
134
134
// Change screenshots file permission so it can be moved from drive to drive
135
135
setFilePermission ( details . path , 0o777 )
136
+ setFilePermission ( paths . image . comparison ( details . name ) , 0o777 )
136
137
renameAndMoveFile ( details . path , paths . image . comparison ( details . name ) )
137
138
} )
138
139
Original file line number Diff line number Diff line change @@ -23,8 +23,10 @@ const readDir = dir => {
23
23
24
24
const setFilePermission = ( dir , permission ) => {
25
25
try {
26
- const fd = fs . openSync ( dir , 'r' )
27
- fs . fchmodSync ( fd , permission )
26
+ if ( fs . existsSync ( dir ) ) {
27
+ const fd = fs . openSync ( dir , 'r' )
28
+ fs . fchmodSync ( fd , permission )
29
+ }
28
30
} catch ( error ) {
29
31
// eslint-disable-next-line no-console
30
32
console . log ( error )
You can’t perform that action at this time.
0 commit comments