Skip to content

Commit

Permalink
fix(stdout): 🐛 Fix stdout without colors
Browse files Browse the repository at this point in the history
  • Loading branch information
vivaxy committed Jun 20, 2019
1 parent fe29b88 commit c4d959a
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 16 deletions.
8 changes: 5 additions & 3 deletions lib/git/commands/gitAdd.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
* @author vivaxy
*/

const execa = require('@vivaxy/execa-process-log').default;
const execa = require('execa');
const logger = require('../../shell/logger.js');

module.exports = async () => {
module.exports = async function gitAdd() {
logger.command('git add .');
return await execa('git', ['add', '.']);
return await execa('git', ['add', '.'], {
stdio: 'inherit',
});
};
8 changes: 5 additions & 3 deletions lib/git/commands/gitCommit.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
* @author vivaxy
*/

const execa = require('@vivaxy/execa-process-log').default;
const execa = require('execa');
const logger = require('../../shell/logger.js');

module.exports = async (commitMessage) => {
module.exports = async function gitCommit(commitMessage) {
logger.command(`git commit -m ${commitMessage}`);
return await execa('git', ['commit', '-m', commitMessage]);
return await execa('git', ['commit', '-m', commitMessage], {
stdio: 'inherit',
});
};
6 changes: 4 additions & 2 deletions lib/git/commands/gitFetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

const execa = require('execa');

module.exports = async () => {
return await execa('git', ['fetch', '-p']);
module.exports = async function gitFetch() {
return await execa('git', ['fetch', '-p'], {
stdio: 'inherit',
});
};
8 changes: 5 additions & 3 deletions lib/git/commands/gitPush.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
* @author vivaxy
*/

const execa = require('@vivaxy/execa-process-log').default;
const execa = require('execa');

const getRemote = require('../status/getRemote.js');
const getBranch = require('../status/getBranch.js');
const checkRemoteDiffer = require('../status/checkRemoteDiffer.js');
const logger = require('../../shell/logger.js');
const GacpError = require('../../errors/GacpError.js');

module.exports = async () => {
module.exports = async function gitPush() {
const branch = await getBranch();

const remoteDiffer = await checkRemoteDiffer(branch);
Expand All @@ -24,5 +24,7 @@ module.exports = async () => {
throw new GacpError('No tracking remote.');
}
logger.command(`git push ${remote} ${branch} --follow-tags`);
return await execa('git', ['push', remote, branch, '--follow-tags']);
return await execa('git', ['push', remote, branch, '--follow-tags'], {
stdio: 'inherit',
});
};
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
},
"homepage": "/~https://github.com/vivaxy/gacp#readme",
"dependencies": {
"@vivaxy/execa-process-log": "^0.1.2",
"babel-polyfill": "^6.16.0",
"chalk": "^2.4.2",
"conventional-commit-types": "^2.1.1",
Expand Down
4 changes: 0 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -479,10 +479,6 @@
resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e"
integrity sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==

"@vivaxy/execa-process-log@^0.1.2":
version "0.1.2"
resolved "https://registry.yarnpkg.com/@vivaxy/execa-process-log/-/execa-process-log-0.1.2.tgz#b93d17160871ae0f2320433632c4c67106e648de"

JSONStream@^1.0.4:
version "1.3.2"
resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.2.tgz#c102371b6ec3a7cf3b847ca00c20bb0fce4c6dea"
Expand Down

0 comments on commit c4d959a

Please sign in to comment.