Loading pkgs/development/compilers/elm/packages/elm-pages-fix-init-read-only.patch +6 −7 Original line number Diff line number Diff line diff --git a/generator/src/init.js b/generator/src/init.js index 3d8548c..90ee20d 100644 index 06386ff..7127dae 100644 --- a/generator/src/init.js +++ b/generator/src/init.js @@ -3,6 +3,21 @@ const copySync = require("fs-extra").copySync; const path = require("path"); const kleur = require("kleur"); @@ -6,6 +6,20 @@ import { fileURLToPath } from "url"; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); +let walknDo = function(somePath, doStuff) { + doStuff(somePath, true); Loading @@ -19,15 +19,14 @@ index 3d8548c..90ee20d 100644 + } + }); +} + + /** * @param {string} name */ @@ -15,6 +30,13 @@ async function run(name) { @@ -18,6 +32,13 @@ export async function run(name) { if (!fs.existsSync(name)) { try { copySync(template, appRoot); await fsExtra.copy(template, appRoot); + walknDo(appRoot, (file, isDir) => { + if (isDir) { + fs.chmodSync(file, 0o755); Loading Loading
pkgs/development/compilers/elm/packages/elm-pages-fix-init-read-only.patch +6 −7 Original line number Diff line number Diff line diff --git a/generator/src/init.js b/generator/src/init.js index 3d8548c..90ee20d 100644 index 06386ff..7127dae 100644 --- a/generator/src/init.js +++ b/generator/src/init.js @@ -3,6 +3,21 @@ const copySync = require("fs-extra").copySync; const path = require("path"); const kleur = require("kleur"); @@ -6,6 +6,20 @@ import { fileURLToPath } from "url"; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); +let walknDo = function(somePath, doStuff) { + doStuff(somePath, true); Loading @@ -19,15 +19,14 @@ index 3d8548c..90ee20d 100644 + } + }); +} + + /** * @param {string} name */ @@ -15,6 +30,13 @@ async function run(name) { @@ -18,6 +32,13 @@ export async function run(name) { if (!fs.existsSync(name)) { try { copySync(template, appRoot); await fsExtra.copy(template, appRoot); + walknDo(appRoot, (file, isDir) => { + if (isDir) { + fs.chmodSync(file, 0o755); Loading