diff --git a/lib/steps/prepareFolders.js b/lib/steps/prepareFolders.js index e2dbd22..af497ac 100644 --- a/lib/steps/prepareFolders.js +++ b/lib/steps/prepareFolders.js @@ -5,9 +5,19 @@ const { NETLIFY_PUBLISH_PATH, NETLIFY_FUNCTIONS_PATH } = require("../config"); // Empty existing publish and functions folders const prepareFolders = ({ functionsPath, publishPath }) => { logTitle("🚀 Next on Netlify 🚀"); - log(" ", "Functions directory: ", functionsPath); - log(" ", "Publish directory: ", publishPath); - log(" ", "Make sure these are set in your netlify.toml file."); + + if (functionsPath === NETLIFY_FUNCTIONS_PATH) { + log(" ", "Functions directory: ", functionsPath); + } + if (publishPath === NETLIFY_PUBLISH_PATH) { + log(" ", "Publish directory: ", publishPath); + } + if ( + functionsPath === NETLIFY_FUNCTIONS_PATH || + publishPath === NETLIFY_PUBLISH_PATH + ) { + log(" ", "Make sure these are set in your netlify.toml file."); + } if (publishPath === NETLIFY_PUBLISH_PATH) emptyDirSync(publishPath); if (functionsPath === NETLIFY_FUNCTIONS_PATH) emptyDirSync(functionsPath);