@vibedeckx/darwin-arm64 0.3.54-win.1 → 0.3.54-win.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +11 -1
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -271323,10 +271323,20 @@ function hashTree(root, relativeFiles) {
|
|
|
271323
271323
|
}
|
|
271324
271324
|
return result;
|
|
271325
271325
|
}
|
|
271326
|
+
function openForFsync(filePath) {
|
|
271327
|
+
if (process.platform !== "win32") return fs12.openSync(filePath, "r");
|
|
271328
|
+
try {
|
|
271329
|
+
return fs12.openSync(filePath, "r+");
|
|
271330
|
+
} catch (error48) {
|
|
271331
|
+
if (error48.code !== "EPERM") throw error48;
|
|
271332
|
+
fs12.chmodSync(filePath, 420);
|
|
271333
|
+
return fs12.openSync(filePath, "r+");
|
|
271334
|
+
}
|
|
271335
|
+
}
|
|
271326
271336
|
function fsyncTree(root) {
|
|
271327
271337
|
const { files, dirs } = walk(root);
|
|
271328
271338
|
for (const file2 of files) {
|
|
271329
|
-
const fd =
|
|
271339
|
+
const fd = openForFsync(path28.join(root, file2));
|
|
271330
271340
|
try {
|
|
271331
271341
|
fs12.fsyncSync(fd);
|
|
271332
271342
|
} finally {
|