mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Merge pull request #3912 from node-red/handle_username_spaces
Ensure key_path is quoted in GIT_SSH_COMMAND in case of spaces in pathname
This commit is contained in:
commit
c4e216f839
@ -106,7 +106,7 @@ function runGitCommandWithSSHCommand(args,cwd,auth,emit) {
|
|||||||
commandEnv.GIT_SSH = path.join(__dirname,"node-red-ssh.sh");
|
commandEnv.GIT_SSH = path.join(__dirname,"node-red-ssh.sh");
|
||||||
commandEnv.NODE_RED_KEY_FILE=auth.key_path;
|
commandEnv.NODE_RED_KEY_FILE=auth.key_path;
|
||||||
// GIT_SSH_COMMAND - added in git 2.3.0
|
// GIT_SSH_COMMAND - added in git 2.3.0
|
||||||
commandEnv.GIT_SSH_COMMAND = "ssh -i " + auth.key_path + " -F /dev/null";
|
commandEnv.GIT_SSH_COMMAND = "ssh -i \"" + auth.key_path + "\" -F /dev/null";
|
||||||
// console.log('commandEnv:', commandEnv);
|
// console.log('commandEnv:', commandEnv);
|
||||||
return runGitCommand(args,cwd,commandEnv,emit).then( result => {
|
return runGitCommand(args,cwd,commandEnv,emit).then( result => {
|
||||||
rs.close();
|
rs.close();
|
||||||
|
Loading…
Reference in New Issue
Block a user