Fix bin permissions (#6902)

This commit is contained in:
fisker Cheung authored and Simon Lydell committed 2019-11-09 17:42:52 +01:00
1 parent b56f95c975
commit 1d1a90144f
2 files changed
+11 -10

No files matched your search

+1 -1
View File
@@ -99,7 +99,7 @@ async function run(params) {
await execa("rm", ["-rf", ".cache"]);
}
const bundleCache = new Cache(".cache/", "v18");
const bundleCache = new Cache(".cache/", "v19");
await bundleCache.load();
console.log(chalk.inverse(" Building packages "));
+10 -9
View File
@@ -6,13 +6,17 @@ const path = require("path");
module.exports = function() {
let banner;
let entry;
let file;
return {
name: "executable",
options(options) {
entry = path.resolve(options.input);
return options;
options(inputOptions) {
entry = path.resolve(inputOptions.input);
},
generateBundle(outputOptions) {
file = outputOptions.file;
},
load(id) {
@@ -36,12 +40,9 @@ module.exports = function() {
}
},
writeBundle(bundle) {
if (banner) {
const files = Object.keys(bundle);
files.forEach(file => {
fs.chmodSync(bundle[file].facadeModuleId, 0o755 & ~process.umask());
});
writeBundle() {
if (banner && file) {
fs.chmodSync(file, 0o755 & ~process.umask());
}
}
};