Skip to content

Commit 2b4e66d

Browse files
committed
change permission
1 parent 8a1bc82 commit 2b4e66d

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

e2e/screenshot.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,17 @@ export class Screenshot {
4545
var dir = path.resolve(this.dir, 'screenshots');
4646
if (!fs.existsSync(dir)) {
4747
console.error(`making dir for ${dir}`);
48-
fs.mkdirSync(dir, 0x744);
48+
fs.mkdirSync(dir, '777');
4949
}
50-
console.error(`write to file ${this.fullPath}`);
51-
fs.writeFileSync(this.fullPath, png, {encoding: 'base64' });
52-
console.error(`wwrite is done`);
50+
51+
if (fs.existsSync(dir)) {
52+
console.error(`write to file ${this.fullPath}`);
53+
fs.writeFileSync(this.fullPath, png/*, {encoding: 'base64' }*/);
54+
console.error(`wwrite is done`);
55+
} else {
56+
console.error(`make dir failed`);
57+
}
58+
5359
}
5460
}
5561

0 commit comments

Comments
 (0)