Skip to content

Commit 766bfbe

Browse files
committed
fix: do not use a shell for git commands
1 parent 35f321c commit 766bfbe

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Diff for: lib/opts.js

+1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ const gitEnv = {
77
module.exports = (opts = {}) => ({
88
stdioString: true,
99
...opts,
10+
shell: false,
1011
env: opts.env || { ...gitEnv, ...process.env }
1112
})

Diff for: test/opts.js

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ const gitEnv = {
77

88
t.match(gitOpts().env, gitEnv, 'got the git defaults we want')
99

10+
t.equal(gitOpts().shell, false, 'shell defaults to false')
11+
t.equal(gitOpts({ shell: '/bin/bash' }).shell, false, 'shell cannot be overridden')
12+
1013
t.test('does not override', t => {
1114
const { GIT_ASKPASS, GIT_SSH_COMMAND } = process.env
1215
t.teardown(() => {

0 commit comments

Comments
 (0)