Merge pull request #1353 from deepak1556/args_patch
atomMain: initialise uv_setup_args
This commit is contained in:
commit
54bb072ae0
1 changed files with 4 additions and 1 deletions
|
@ -3,6 +3,7 @@
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
#include "atom/app/atom_main_args.h"
|
#include "atom/app/atom_main_args.h"
|
||||||
|
#include "vendor/node/deps/uv/include/uv.h"
|
||||||
|
|
||||||
namespace atom {
|
namespace atom {
|
||||||
|
|
||||||
|
@ -11,8 +12,10 @@ std::vector<std::string> AtomCommandLine::argv_;
|
||||||
|
|
||||||
// static
|
// static
|
||||||
void AtomCommandLine::Init(int argc, const char* const* argv) {
|
void AtomCommandLine::Init(int argc, const char* const* argv) {
|
||||||
|
// Hack around with the argv pointer. Used for process.title = "blah"
|
||||||
|
char** new_argv = uv_setup_args(argc, const_cast<char**>(argv));
|
||||||
for (int i = 0; i < argc; ++i) {
|
for (int i = 0; i < argc; ++i) {
|
||||||
argv_.push_back(argv[i]);
|
argv_.push_back(new_argv[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue