Skip to content

Commit 592b02e

Browse files
author
Joshua Grosso
committed
Adjust for rebase-caused changes
1 parent 8fa2682 commit 592b02e

File tree

5 files changed

+9
-7
lines changed

5 files changed

+9
-7
lines changed

src/commands/fetch.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ function fetch(repo, options) {
7878
const argsString = R.join(' ', args);
7979
return core.fetch(argsString, { cwd: repo.workdir(), shell: true }, callback)
8080
.then(({ stdout }) => {
81+
const response = generateResponse();
8182
response.raw = stdout;
8283
response.fetch = generateFetchStats(stdout);
8384

@@ -88,7 +89,7 @@ function fetch(repo, options) {
8889
}
8990

9091
return response;
91-
}, errorCatchHandler(response));
92+
}, errorCatchHandler);
9293
}
9394

9495
export default fetch;

src/commands/pull.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ function pull(repo, options) {
7777

7878
return core.pull(argsString, { cwd: repo.workdir(), shell: true }, callback)
7979
.then(({ stdout }) => {
80+
const response = generateResponse();
8081
response.raw = stdout;
8182
response.pull = generatePullStats(stdout);
8283

@@ -87,7 +88,7 @@ function pull(repo, options) {
8788
}
8889

8990
return response;
90-
}, errorCatchHandler(response));
91+
}, errorCatchHandler);
9192
}
9293

9394
export default pull;

src/commands/version.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import {
66
} from '../constants';
77
import generateResponse from '../utils/generateResponse';
88

9-
const version = () => {
10-
return core.version()
9+
const version = () =>
10+
core.version()
1111
.then(({ stdout, stderr }) => {
1212
const response = generateResponse();
1313
response.raw = stdout;

src/utils/execHelper.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import child from 'child_process';
22
import R from 'ramda';
33

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

88
if (process.platform !== 'win32' && !R.contains('/usr/local/bin', options.env.PATH)) {
99
options.env.PATH = `${options.env.PATH}${':/usr/local/bin'}`;

test/tests/utils/execHelper.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ describe('execHelper', () => {
4040
mockProcess
4141
} = this;
4242

43-
const promise = exec('test', '', { foo: 'bar' });
43+
const promise = exec('test', '');
4444
execSpy.firstCall.args[2](null, 'some stdout', 'some stderr');
4545
return promise
4646
.then((result) => {

0 commit comments

Comments
 (0)