Skip to content

Commit

Permalink
clone all now sets target properly
Browse files Browse the repository at this point in the history
  • Loading branch information
machellerogden committed Feb 24, 2017
1 parent 4b60f50 commit 09ec1fd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 4 additions & 1 deletion cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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.');
}
Expand Down
5 changes: 0 additions & 5 deletions dotfiles/cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 09ec1fd

Please sign in to comment.