Skip to content
2 changes: 1 addition & 1 deletion binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
['OS=="win"', {
'targets': [
{
'target_name': 'conpty',
'target_name': 'conpty_backend',
'sources' : [
'src/win/conpty.cc',
'src/win/path_util.cc'
Expand Down
4 changes: 2 additions & 2 deletions scripts/post-install.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ const path = require('path');

const RELEASE_DIR = path.join(__dirname, '../build/Release');
const BUILD_FILES = [
path.join(RELEASE_DIR, 'conpty.node'),
path.join(RELEASE_DIR, 'conpty.pdb'),
path.join(RELEASE_DIR, 'conpty_backend.node'),
path.join(RELEASE_DIR, 'conpty_backend.pdb'),
path.join(RELEASE_DIR, 'conpty_console_list.node'),
path.join(RELEASE_DIR, 'conpty_console_list.pdb'),
path.join(RELEASE_DIR, 'pty.node'),
Expand Down
2 changes: 1 addition & 1 deletion src/win/conpty.cc
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ HANDLE LoadConptyDll(const Napi::CallbackInfo& info,
return LoadLibraryExW(L"kernel32.dll", 0, 0);
}
wchar_t currentDir[MAX_PATH];
HMODULE hModule = GetModuleHandleA("conpty.node");
HMODULE hModule = GetModuleHandleA("conpty_backend.node");
if (hModule == NULL) {
throw errorWithCode(info, "Failed to get conpty.node module handle");
}
Expand Down
4 changes: 2 additions & 2 deletions src/windowsPtyAgent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ export class WindowsPtyAgent {
if (this._useConpty) {
if (!conptyNative) {
try {
conptyNative = require('../build/Release/conpty.node');
conptyNative = require('../build/Release/conpty_backend.node');
} catch (outerError) {
try {
conptyNative = require('../build/Debug/conpty.node');
conptyNative = require('../build/Debug/conpty_backend.node');
} catch (innerError) {
console.error('innerError', innerError);
// Re-throw the exception from the Release require if the Debug require fails as well
Expand Down
Loading