fix push
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import * as plugins from "./smartgit.plugins";
|
||||
import * as helpers from "./smartgit.helpers";
|
||||
|
||||
export let push = (dirPathArg:string, sourceArg:string = "", branchArg:string = "") => {
|
||||
export let push = (dirPathArg:string, remoteNameArg:string = "", remoteBranchArg:string = "") => {
|
||||
let done = plugins.Q.defer();
|
||||
if(!helpers.isGitDirectory(dirPathArg)){
|
||||
plugins.beautylog.error("smartgit.push expects a valid git directory");
|
||||
@@ -9,7 +9,7 @@ export let push = (dirPathArg:string, sourceArg:string = "", branchArg:string =
|
||||
return done.promise;
|
||||
}
|
||||
// if everything seems allright proceed
|
||||
plugins.shelljs.exec(`(cd ${dirPathArg} && git status)`);
|
||||
plugins.shelljs.exec(`(cd ${dirPathArg} && git push ${remoteNameArg} ${remoteBranchArg})`);
|
||||
done.resolve();
|
||||
return done.promise;
|
||||
};
|
Reference in New Issue
Block a user