From 09ec1fdbcf2ae95e48ae1f1e4df0928acc00de29 Mon Sep 17 00:00:00 2001 From: Mac Heller-Ogden Date: Fri, 24 Feb 2017 11:09:04 -0600 Subject: [PATCH] clone all now sets target properly --- cli.js | 5 ++++- dotfiles/cli.sh | 5 ----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/cli.js b/cli.js index b6c3d18..e4f351f 100644 --- a/cli.js +++ b/cli.js @@ -4,6 +4,7 @@ const _ = require('lodash'); const inquirer = require('inquirer'); const path = require('path'); const Promise = require('bluebird'); +const workspaceDir = require('./lib/workspaceDir'); const refresh = _.partial(lib.getSourceData, true); @@ -57,7 +58,9 @@ function cli(options) { } ]).then((answers) => { if (answers.confirm) { - return Promise.resolve(repos).map(lib.maybeClone); + return Promise.resolve(repos).map(lib.maybeClone).then(() => { + return { repoDir: workspaceDir }; + }); } else { throw new Error('Clone All Aborted.'); } diff --git a/dotfiles/cli.sh b/dotfiles/cli.sh index 7a8d482..71df646 100644 --- a/dotfiles/cli.sh +++ b/dotfiles/cli.sh @@ -7,11 +7,6 @@ function bitcar_cli() { return fi - if [ "$1" == "--clone-all" ] || [ "$2" == "--clone-all" ]; then - bitcar "$@" && cd "$workspace_dir" - return - fi - local target="$HOME/.bitcar/.bitcar_target" bitcar "$@" && if [ -f "$target" ]; then cd "$(cat "$target")" && rm "$target"; fi }