mirror of https://github.com/keeweb/keeweb
native messaging host tests
parent
27b116798e
commit
f893dcb19a
|
@ -49,7 +49,7 @@ std::string keeweb_pipe_name() {
|
|||
std::cerr << "Error getting user: " << uv_err_name(err) << std::endl;
|
||||
} else {
|
||||
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32)
|
||||
pipe_name = "\\\\.pipe\\keeweb-browser-" + std::string{user_info.username} + ".sock";
|
||||
pipe_name = "\\\\.\\pipe\\keeweb-browser-" + std::string{user_info.username};
|
||||
#else
|
||||
pipe_name = std::filesystem::temp_directory_path() /
|
||||
("keeweb-browser-" + std::to_string(user_info.uid) + ".sock");
|
||||
|
|
|
@ -6,15 +6,17 @@ import childProcess from 'child_process';
|
|||
import { expect } from 'chai';
|
||||
|
||||
describe('KeeWeb extension native module host', function () {
|
||||
const hostPath = 'build/keeweb-native-messaging-host';
|
||||
const extensionOrigin = 'keeweb-connect@keeweb.info';
|
||||
|
||||
const userInfo = os.userInfo();
|
||||
let sockPath;
|
||||
let hostPath;
|
||||
if (process.platform === 'win32') {
|
||||
sockPath = `\\\\.pipe\\keeweb-browser-${userInfo.username}`;
|
||||
sockPath = `\\\\.\\pipe\\keeweb-browser-${userInfo.username}`;
|
||||
hostPath = 'build\\Debug\\keeweb-native-messaging-host.exe';
|
||||
} else {
|
||||
sockPath = path.join(os.tmpdir(), `keeweb-browser-${userInfo.uid}.sock`);
|
||||
hostPath = 'build/keeweb-native-messaging-host';
|
||||
}
|
||||
|
||||
let server;
|
||||
|
|
Loading…
Reference in New Issue