The recursive remove doesn't work on Windows. Still not sure if cmd.exe or powershell will be used on all platforms but this rd command works.

master
Zed A. Shaw 2 years ago
parent 5f0432fb70
commit 82813aec03
  1. 6
      commands/create.js
  2. 2
      package.json

@ -46,6 +46,10 @@ export const main = async (target, opts) => {
if(opts.keepGit) { if(opts.keepGit) {
log.warn("Keeping the .git directory, so be sure to delete it if you want to do your own work."); log.warn("Keeping the .git directory, so be sure to delete it if you want to do your own work.");
} else { } else {
exec_i(`rm -rf ${path.join(target, ".git")}`); if(process.platform === "win32") {
exec_i(`rd /s /q ${path.join(target, ".git")}`);
} else {
exec_i(`rm -rf ${path.join(target, ".git")}`);
}
} }
} }

@ -1,6 +1,6 @@
{ {
"name": "ljsthw-bandolier", "name": "ljsthw-bandolier",
"version": "0.3.0", "version": "0.3.1",
"description": "Generates projects using the Bandolier educational framework.", "description": "Generates projects using the Bandolier educational framework.",
"main": "bando.js", "main": "bando.js",
"bin": { "bin": {

Loading…
Cancel
Save