Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated dependences + applied Sergey Chadov win32 fix #32

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"version": "1.0.2",
"license": "MIT",
"dependencies": {
"temp": "~0.5.1"
"temp": "~0.8.1"
},
"devDependencies": {
"chai": "~1.5.0",
"chai": "~1.10.0",
"mocha": "~1.9.0"
},
"optionalDependencies": {},
Expand Down
6 changes: 5 additions & 1 deletion src/shell.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <node.h>
#include <string>
#include <vector>

#ifdef _WIN32

Expand Down Expand Up @@ -31,9 +32,12 @@ int exec(const char* command) {
si.cb = sizeof(si);
ZeroMemory(&pi, sizeof(pi));

int command_len = strlen(command);
std::vector<char> command_copy(&command[0], &command[command_len]);

// Start the child process.
if(!CreateProcess(NULL, // No module name (use command line)
(LPSTR) command,// Command line
(LPSTR) &command_copy[0],// Command line
NULL, // Process handle not inheritable
NULL, // Thread handle not inheritable
FALSE, // Set handle inheritance to FALSE
Expand Down