fix(git): honor standalone credential-helper permission
Complete the createGit option handling introduced in #3383.
This commit is contained in:
@@ -357,9 +357,9 @@ const createGit = async (directory, { allowUnsafeSshCommand = false, allowUnsafe
|
|||||||
const spawnOptions = { windowsHide: true };
|
const spawnOptions = { windowsHide: true };
|
||||||
const binary = getGitBinary();
|
const binary = getGitBinary();
|
||||||
const hasCustomBinary = typeof binary === 'string' && binary.trim() && binary !== 'git' && binary !== 'git.exe';
|
const hasCustomBinary = typeof binary === 'string' && binary.trim() && binary !== 'git' && binary !== 'git.exe';
|
||||||
const unsafe = hasCustomBinary || allowUnsafeSshCommand
|
const unsafe = hasCustomBinary || allowUnsafeSshCommand || allowUnsafeCredentialHelper
|
||||||
? {
|
? {
|
||||||
...(hasCustomBinary && { allowUnsafeCustomBinary: true }),
|
...(hasCustomBinary && { allowUnsafeCustomBinary: true }),
|
||||||
...(allowUnsafeSshCommand && { allowUnsafeSshCommand: true }),
|
...(allowUnsafeSshCommand && { allowUnsafeSshCommand: true }),
|
||||||
...(allowUnsafeCredentialHelper && { allowUnsafeCredentialHelper: true }),
|
...(allowUnsafeCredentialHelper && { allowUnsafeCredentialHelper: true }),
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user