Skip to content

Commit 75b343b

Browse files
authored
Merge pull request #137 from abetomo/clean_pip.js
Remove unnecessary `new Error()`
2 parents 08f9425 + fbaf8ba commit 75b343b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/pip.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function installRequirements() {
4444
throw new Error(`${this.options.pythonBin} not found! ` +
4545
'Try the pythonBin option.');
4646
}
47-
throw new Error(pipTestRes.error);
47+
throw pipTestRes.error;
4848
}
4949
if (pipTestRes.stdout.toString().indexOf('--system') >= 0) {
5050
pipCmd.push('--system');
@@ -70,7 +70,7 @@ function installRequirements() {
7070
'run', '--rm',
7171
'-v', `${bindPath}:/var/task:z`,
7272
];
73-
if(this.options.dockerSsh) {
73+
if (this.options.dockerSsh) {
7474
// Mount necessary ssh files to work with private repos
7575
options.push('-v', `${process.env.HOME}/.ssh/id_rsa:/root/.ssh/id_rsa:z`);
7676
options.push('-v', `${process.env.HOME}/.ssh/known_hosts:/root/.ssh/known_hosts:z`);
@@ -100,7 +100,7 @@ function installRequirements() {
100100
}
101101
throw new Error(`${this.options.pythonBin} not found! Try the pythonBin option.`);
102102
}
103-
throw new Error(res.error);
103+
throw res.error;
104104
}
105105
if (res.status !== 0) {
106106
throw new Error(res.stderr);

0 commit comments

Comments
 (0)