diff --git a/red/runtime/storage/localfilesystem/projects/git/authServer.js b/red/runtime/storage/localfilesystem/projects/git/authServer.js index d38ea9fd0..95b4eda0c 100644 --- a/red/runtime/storage/localfilesystem/projects/git/authServer.js +++ b/red/runtime/storage/localfilesystem/projects/git/authServer.js @@ -24,7 +24,7 @@ function getListenPath() { var fn = 'node-red-git-askpass-'+seed+'-sock'; var listenPath; if (process.platform === 'win32') { - listenPath = '\\\\.\\pipe\\'+getListenPath; + listenPath = '\\\\.\\pipe\\'+fn; } else { listenPath = path.join(process.env['XDG_RUNTIME_DIR'] || os.tmpdir(), fn); } diff --git a/test/red/runtime/storage/localfilesystem/projects/git/authWriter_spec.js b/test/red/runtime/storage/localfilesystem/projects/git/authWriter_spec.js index 71fb52a4e..a0b1ab5f5 100644 --- a/test/red/runtime/storage/localfilesystem/projects/git/authWriter_spec.js +++ b/test/red/runtime/storage/localfilesystem/projects/git/authWriter_spec.js @@ -29,7 +29,7 @@ function getListenPath() { var fn = 'node-red-git-askpass-'+seed+'-sock'; var listenPath; if (process.platform === 'win32') { - listenPath = '\\\\.\\pipe\\'+getListenPath; + listenPath = '\\\\.\\pipe\\'+fn; } else { listenPath = path.join(process.env['XDG_RUNTIME_DIR'] || os.tmpdir(), fn); } @@ -55,9 +55,10 @@ describe("localfilesystem/projects/git/authWriter", function() { var listenPath = getListenPath(); server.listen(listenPath, function(ready) { - child_process.exec(process.execPath+' "'+authWriter+'" "'+listenPath+'" TEST_PHRASE_FOO',{cwd:__dirname}, (error,stdout,stderr) => { + child_process.exec('"'+process.execPath+'" "'+authWriter+'" "'+listenPath+'" TEST_PHRASE_FOO',{cwd:__dirname}, (error,stdout,stderr) => { server.close(); try { + error.should.equal(0); receivedData.should.eql("TEST_PHRASE_FOO\n"); done(); } catch(err) {