Skip to content

Commit

Permalink
Merge pull request #331 from microsoft/node12_windows
Browse files Browse the repository at this point in the history
fix: node 12 build errors for windows
  • Loading branch information
Tyriar committed Jul 6, 2019
2 parents 04445ed + 063aa19 commit 32ea3e4
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 6 deletions.
42 changes: 39 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,22 @@ jobs:
- job: Linux
pool:
vmImage: 'ubuntu-16.04'
strategy:
matrix:
node_8_x:
node_version: 8.x
node_9_x:
node_version: 9.x
node_10_x:
node_version: 10.x
node_11_x:
node_version: 11.x
node_12_x:
node_version: 12.x
steps:
- task: NodeTool@0
inputs:
versionSpec: '8.x'
versionSpec: $(node_version)
displayName: 'Install Node.js'
- script: |
npm i
Expand All @@ -25,10 +37,22 @@ jobs:
- job: macOS
pool:
vmImage: 'xcode9-macos10.13'
strategy:
matrix:
node_8_x:
node_version: 8.x
node_9_x:
node_version: 9.x
node_10_x:
node_version: 10.x
node_11_x:
node_version: 11.x
node_12_x:
node_version: 12.x
steps:
- task: NodeTool@0
inputs:
versionSpec: '8.x'
versionSpec: $(node_version)
displayName: 'Install Node.js'
- script: |
npm i
Expand All @@ -43,10 +67,22 @@ jobs:
- job: Windows
pool:
vmImage: 'vs2017-win2016'
strategy:
matrix:
node_8_x:
node_version: 8.x
node_9_x:
node_version: 9.x
node_10_x:
node_version: 10.x
node_11_x:
node_version: 11.x
node_12_x:
node_version: 12.x
steps:
- task: NodeTool@0
inputs:
versionSpec: '8.x'
versionSpec: $(node_version)
displayName: 'Install Node.js'
- script: |
npm i
Expand Down
4 changes: 2 additions & 2 deletions src/win/conpty.cc
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,9 @@ static NAN_METHOD(PtyStartProcess) {
const std::wstring filename(path_util::to_wstring(Nan::Utf8String(info[0])));
const SHORT cols = info[1]->Uint32Value(Nan::GetCurrentContext()).FromJust();
const SHORT rows = info[2]->Uint32Value(Nan::GetCurrentContext()).FromJust();
const bool debug = info[3]->ToBoolean(Nan::GetCurrentContext()).ToLocalChecked()->IsTrue();
const bool debug = Nan::To<bool>(info[3]).FromJust();
const std::wstring pipeName(path_util::to_wstring(Nan::Utf8String(info[4])));
const bool inheritCursor = info[5]->ToBoolean(Nan::GetCurrentContext()).ToLocalChecked()->IsTrue();
const bool inheritCursor = Nan::To<bool>(info[5]).FromJust();

// use environment 'Path' variable to determine location of
// the relative path that we have recieved (e.g cmd.exe)
Expand Down
2 changes: 1 addition & 1 deletion src/win/winpty.cc
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ static NAN_METHOD(PtyStartProcess) {

int cols = info[4]->Int32Value(Nan::GetCurrentContext()).FromJust();
int rows = info[5]->Int32Value(Nan::GetCurrentContext()).FromJust();
bool debug = info[6]->ToBoolean(Nan::GetCurrentContext()).ToLocalChecked()->IsTrue();
bool debug = Nan::To<bool>(info[6]).FromJust();

// Enable/disable debugging
SetEnvironmentVariable(WINPTY_DBG_VARIABLE, debug ? "1" : NULL); // NULL = deletes variable
Expand Down

0 comments on commit 32ea3e4

Please sign in to comment.