Skip to content

Commit

Permalink
feat: rename skipGitUpdate to disableGitPull
Browse files Browse the repository at this point in the history
  • Loading branch information
medikoo committed Nov 9, 2018
1 parent 2e91ec7 commit 4643f51
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions bin/dev-package.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ require("log4-nodejs")({ defaultNamespace: "dev-package" });
const meta = require("../package");

const argv = require("minimist")(process.argv.slice(2), {
boolean: ["enable-git-push", "skip-git-update"]
boolean: ["disable-git-pull", "enable-git-push"]
});

const usage = `dev-package v${ meta.version } - Install dev package
Expand All @@ -23,7 +23,7 @@ where <command> is one of:
Options:
--skip-git-update Do not 'git pull' on update
--disable-git-pull Do not pull changes from remote
--enable-git-push Push committed changes to remote
--version, -v Display version
--help, -h Show this message
Expand Down Expand Up @@ -60,6 +60,6 @@ if (!packageName) {
}

require("../lib/private/cli")(packageName, {
gitPush: argv["enable-git-push"],
skipGitUpdate: argv["skip-git-update"]
gitPull: !argv["disable-git-pull"],
gitPush: argv["enable-git-push"]
});
2 changes: 1 addition & 1 deletion lib/setup-repository.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const isObject = require("es5-ext/object/is-object")
module.exports = async (path, repoUrl, options = {}) => {
if (!isObject(options)) options = {};
if (await isDirectory(path)) {
const tryPull = !options.skipGitUpdate, tryPush = options.gitPush;
const tryPull = options.gitPull, tryPush = options.gitPush;

if (!tryPull && !tryPush) return false;

Expand Down

0 comments on commit 4643f51

Please sign in to comment.