Skip to content

Commit 00a1d61

Browse files
committed
Fix OS::GetExecutablePath for platform_none
1 parent 8b10828 commit 00a1d61

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/node.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1648,7 +1648,7 @@ static void Load(int argc, char *argv[]) {
16481648
// as a last ditch effort, fallback on argv[0] ?
16491649
process->Set(String::NewSymbol("execPath"), String::New(argv[0]));
16501650
} else {
1651-
process->Set(String::NewSymbol("execPath"), String::New(execPath));
1651+
process->Set(String::NewSymbol("execPath"), String::New(execPath, size));
16521652
}
16531653

16541654

src/platform_none.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ int OS::GetMemory(size_t *rss, size_t *vsize) {
3030

3131
int OS::GetExecutablePath(char *buffer, size_t* size) {
3232
*size = 0;
33-
return 0;
33+
return -1;
3434
}
3535

3636
} // namespace node

0 commit comments

Comments
 (0)