Skip to content
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