From f9bed87ffb14b366f848fbe9ba011af738418456 Mon Sep 17 00:00:00 2001 From: "Zed A. Shaw" Date: Sat, 3 Dec 2022 05:49:09 -0500 Subject: [PATCH] Apparently, git's clone --templates feature is nothing like what the documentation describes. It _only_ installs files that are on the local machine, rather than from the repository content which is what I'd expect based on the documentation. --- commands/create.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/commands/create.js b/commands/create.js index dbecbb7..3cae628 100644 --- a/commands/create.js +++ b/commands/create.js @@ -4,11 +4,11 @@ import { log } from "../lib/logging.js"; export const BANDO_GIT = "https://git.learnjsthehardway.com/learn-javascript-the-hard-way/bandolier-template.git"; -export const description = "Test command."; +export const description = "Installs demo/template repositories for the Bandolier project of Learn JavaScript the Hard Way."; export const options = [ ["--repo", "repository to dupe and setup", BANDO_GIT], - ["--template", "templates directory to use for setups", "commands/templates"] + ["--template", "templates directory to use for setups", "./commands/templates"] ]; export const argument = ["", "name of the project"]; @@ -23,7 +23,7 @@ export const main = async (target, opts) => { process.exit(1); } catch(error) { // access is stupid, it throws an exception but we want the negative response as a positive outcome - exec_i(`git clone --depth 1 ${BANDO_GIT} ${target} --template=${opts.template}`); + exec_i(`git clone --depth 1 ${BANDO_GIT} ${target}`); process.exit(0); } }