Skip to content

Commit

Permalink
Merge pull request #695 from appwrite/fix-prefs-permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
lohanidamodar authored Jul 25, 2023
2 parents 0965751 + cdffea8 commit ee12cb1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions templates/cli/lib/config.js.twig
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ class Config {
const file = fs.readFileSync(this.path).toString();
this.data = JSONbig.parse(file);
} catch (e) {
// console.log(`${this.path} not found. Empty data`);
this.data = {};
}
}
Expand All @@ -25,7 +24,7 @@ class Config {
if (!fs.existsSync(dir)) {
fs.mkdirSync(dir, { recursive: true });
}
fs.writeFileSync(this.path, JSONbig.stringify(this.data, null, 4));
fs.writeFileSync(this.path, JSONbig.stringify(this.data, null, 4), { mode: 0o600 });
}

get(key) {
Expand Down

0 comments on commit ee12cb1

Please sign in to comment.