From 11a89579d4ccc62e8dbd6851703d2169466e09c5 Mon Sep 17 00:00:00 2001 From: Noah Allen Date: Thu, 5 May 2022 15:13:41 -0700 Subject: [PATCH] Set 0o777 permissions on downloaded sources --- packages/env/lib/download-sources.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/env/lib/download-sources.js b/packages/env/lib/download-sources.js index 537389317b058..1a0bf42b64d44 100644 --- a/packages/env/lib/download-sources.js +++ b/packages/env/lib/download-sources.js @@ -71,7 +71,8 @@ module.exports = function downloadSources( config, spinner ) { /** * Downloads the given source if necessary. The specific action taken depends - * on the source type. The source is downloaded to source.path. + * on the source type. The source is downloaded to source.path and rwx permissions + * are applied. * * @param {WPSource} source The source to download. * @param {Object} options @@ -85,6 +86,8 @@ async function downloadSource( source, options ) { } else if ( source.type === 'zip' ) { await downloadZipSource( source, options ); } + + await fs.promises.chmod( source.path, 0o777 ); } /**