We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0b38edd commit b978266Copy full SHA for b978266
package.json
@@ -28,6 +28,7 @@
28
"dependencies": {
29
"@iarna/toml": "^2.2.5",
30
"cpx": "^1.5.0",
31
+ "make-dir": "^3.1.0",
32
"netlify-lambda": "satyarohith/netlify-lambda#88eac6a37bfb0920897c86ecda8682944a2bf5be",
33
"netlify-redirect-parser": "^2.5.0",
34
"nimbella-cli": "https://apigcp.nimbella.io/downloads/nim/nim-v1.8.0/nim-v1.8.0.tar.gz"
src/index.js
@@ -222,6 +222,11 @@ module.exports = {
222
}
223
224
if (redirectRules.length > 0) {
225
+ if (!existsSync(constants.PUBLISH_DIR)) {
226
+ const mkdir = require('make-dir');
227
+ await mkdir(constants.PUBLISH_DIR);
228
+ }
229
+
230
await appendFile(redirectsFile, redirectRules.join('\n'));
231
232
0 commit comments