Skip to content

Commit

Permalink
fix: create hosting folder when YOLO mode
Browse files Browse the repository at this point in the history
  • Loading branch information
manekinekko committed Sep 27, 2019
1 parent 19f17f0 commit 075ccf2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/features/hosting/index.ts
@@ -1,13 +1,13 @@
import inquirer = require("inquirer");
import chalk from "chalk";
import { askForHostingFolder } from "../../core/prompt";
import { az, Config, copyTemplate, saveWorkspace } from "../../core/utils";
import { az, Config, copyTemplate, saveWorkspace, createDirectoryIfNotExists } from "../../core/utils";
const debug = require("debug")("hosting");

module.exports = async function() {
const isForceModeEnabled = !!process.env.HEXA_FORCE_MODE;

let publicFolder = "public";
let publicFolder = "./public";
let folder, overrideHtml, override404, overrideError;

if (isForceModeEnabled === false) {
Expand All @@ -17,6 +17,7 @@ module.exports = async function() {
);
} else {
[folder, overrideHtml, override404, overrideError] = [publicFolder, true, true, true];
createDirectoryIfNotExists(publicFolder);
}

if (overrideHtml || typeof overrideHtml === "undefined") {
Expand Down

0 comments on commit 075ccf2

Please sign in to comment.