Skip to content

Commit 43e44a6

Browse files
authored
Explicitly disable chown for file writes (#32)
1 parent ff4e4b4 commit 43e44a6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const main = async (filePath, data, options) => {
5757

5858
const json = JSON.stringify(data, options.replacer, indent);
5959

60-
return writeFileAtomic(filePath, `${json}${trailingNewline}`, {mode: options.mode});
60+
return writeFileAtomic(filePath, `${json}${trailingNewline}`, {mode: options.mode, chown: false});
6161
};
6262

6363
const mainSync = (filePath, data, options) => {
@@ -80,7 +80,7 @@ const mainSync = (filePath, data, options) => {
8080

8181
const json = JSON.stringify(data, options.replacer, indent);
8282

83-
return writeFileAtomic.sync(filePath, `${json}${trailingNewline}`, {mode: options.mode});
83+
return writeFileAtomic.sync(filePath, `${json}${trailingNewline}`, {mode: options.mode, chown: false});
8484
};
8585

8686
module.exports = async (filePath, data, options) => {

0 commit comments

Comments
 (0)