diff --git a/src/actions/install-dependencies.js b/src/actions/install-dependencies.js index a11c9d5..0823ee5 100644 --- a/src/actions/install-dependencies.js +++ b/src/actions/install-dependencies.js @@ -1,6 +1,6 @@ import { confirm } from "@inquirer/prompts"; import { runCommand } from "../utils.js"; -import { warn } from "../console.js"; +import { log, warn } from "../console.js"; export default async function installDependencies(projectName) { const installDependencies = await confirm({ @@ -8,6 +8,9 @@ export default async function installDependencies(projectName) { }); if (installDependencies) { const installed = runCommand(`cd ${projectName} && npm i`); - if (!installed) warn("Unable to install dependencies."); + if (!installed) { + log("-".repeat(55)); + warn("Unable to install dependencies."); + } } } diff --git a/src/flows/create-new-game.js b/src/flows/create-new-game.js index a2204ef..85553a7 100644 --- a/src/flows/create-new-game.js +++ b/src/flows/create-new-game.js @@ -90,6 +90,5 @@ export async function createNewGame() { cleanTemplate(fullPath, projectName); await installDependencies(projectName); await initRepo(projectName); - outro(projectName, template.startCommand); } diff --git a/src/flows/inspect-game.js b/src/flows/inspect-game.js index 485a395..3f4a7b1 100644 --- a/src/flows/inspect-game.js +++ b/src/flows/inspect-game.js @@ -174,6 +174,5 @@ export async function inspectGame() { console.error("Unable to clone repo."); return; } - await installDependencies(targetFolder); outro(targetFolder); } diff --git a/src/utils.js b/src/utils.js index 7a6f269..a3d51ba 100644 --- a/src/utils.js +++ b/src/utils.js @@ -28,8 +28,6 @@ export function runCommand(command) { try { execSync(`${command}`, { stdio: "inherit" }); } catch (e) { - alert(`Failed to execute ${command}.`); - log(e); return false; } return true; diff --git a/sword-adventure b/sword-adventure deleted file mode 160000 index f87d159..0000000 --- a/sword-adventure +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f87d159e303cacae260d0863e7ba5317e8a86c87