Skip to content

Commit

Permalink
Adjust for rebase-caused changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Grosso committed Aug 31, 2017
1 parent 8fa2682 commit 592b02e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
3 changes: 2 additions & 1 deletion src/commands/fetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ function fetch(repo, options) {
const argsString = R.join(' ', args);
return core.fetch(argsString, { cwd: repo.workdir(), shell: true }, callback)
.then(({ stdout }) => {
const response = generateResponse();
response.raw = stdout;
response.fetch = generateFetchStats(stdout);

Expand All @@ -88,7 +89,7 @@ function fetch(repo, options) {
}

return response;
}, errorCatchHandler(response));
}, errorCatchHandler);
}

export default fetch;
3 changes: 2 additions & 1 deletion src/commands/pull.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ function pull(repo, options) {

return core.pull(argsString, { cwd: repo.workdir(), shell: true }, callback)
.then(({ stdout }) => {
const response = generateResponse();
response.raw = stdout;
response.pull = generatePullStats(stdout);

Expand All @@ -87,7 +88,7 @@ function pull(repo, options) {
}

return response;
}, errorCatchHandler(response));
}, errorCatchHandler);
}

export default pull;
4 changes: 2 additions & 2 deletions src/commands/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import {
} from '../constants';
import generateResponse from '../utils/generateResponse';

const version = () => {
return core.version()
const version = () =>
core.version()
.then(({ stdout, stderr }) => {
const response = generateResponse();
response.raw = stdout;
Expand Down
4 changes: 2 additions & 2 deletions src/utils/execHelper.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import child from 'child_process';
import R from 'ramda';

const exec = (command, input, opts) => new Promise(
const exec = (command, input, opts = {}) => new Promise(
(resolve, reject) => {
const options = R.mergeDeepRight((opts || {}), { env: process.env });
const options = R.mergeDeepRight(opts, { env: process.env });

if (process.platform !== 'win32' && !R.contains('/usr/local/bin', options.env.PATH)) {
options.env.PATH = `${options.env.PATH}${':/usr/local/bin'}`;
Expand Down
2 changes: 1 addition & 1 deletion test/tests/utils/execHelper.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ describe('execHelper', () => {
mockProcess
} = this;

const promise = exec('test', '', { foo: 'bar' });
const promise = exec('test', '');
execSpy.firstCall.args[2](null, 'some stdout', 'some stderr');
return promise
.then((result) => {
Expand Down

0 comments on commit 592b02e

Please sign in to comment.