mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
parent
771e43583a
commit
8672fcd2bb
@ -24,7 +24,7 @@ function getListenPath() {
|
|||||||
var fn = 'node-red-git-askpass-'+seed+'-sock';
|
var fn = 'node-red-git-askpass-'+seed+'-sock';
|
||||||
var listenPath;
|
var listenPath;
|
||||||
if (process.platform === 'win32') {
|
if (process.platform === 'win32') {
|
||||||
listenPath = '\\\\.\\pipe\\'+getListenPath;
|
listenPath = '\\\\.\\pipe\\'+fn;
|
||||||
} else {
|
} else {
|
||||||
listenPath = path.join(process.env['XDG_RUNTIME_DIR'] || os.tmpdir(), fn);
|
listenPath = path.join(process.env['XDG_RUNTIME_DIR'] || os.tmpdir(), fn);
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ function getListenPath() {
|
|||||||
var fn = 'node-red-git-askpass-'+seed+'-sock';
|
var fn = 'node-red-git-askpass-'+seed+'-sock';
|
||||||
var listenPath;
|
var listenPath;
|
||||||
if (process.platform === 'win32') {
|
if (process.platform === 'win32') {
|
||||||
listenPath = '\\\\.\\pipe\\'+getListenPath;
|
listenPath = '\\\\.\\pipe\\'+fn;
|
||||||
} else {
|
} else {
|
||||||
listenPath = path.join(process.env['XDG_RUNTIME_DIR'] || os.tmpdir(), fn);
|
listenPath = path.join(process.env['XDG_RUNTIME_DIR'] || os.tmpdir(), fn);
|
||||||
}
|
}
|
||||||
@ -55,9 +55,10 @@ describe("localfilesystem/projects/git/authWriter", function() {
|
|||||||
var listenPath = getListenPath();
|
var listenPath = getListenPath();
|
||||||
|
|
||||||
server.listen(listenPath, function(ready) {
|
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();
|
server.close();
|
||||||
try {
|
try {
|
||||||
|
error.should.equal(0);
|
||||||
receivedData.should.eql("TEST_PHRASE_FOO\n");
|
receivedData.should.eql("TEST_PHRASE_FOO\n");
|
||||||
done();
|
done();
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
|
Loading…
Reference in New Issue
Block a user