electron/atom/app/atom_main_args.cc

23 lines
606 B
C++
Raw Normal View History

// Copyright (c) 2013 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#include "atom/app/atom_main_args.h"
2015-04-04 13:50:21 +00:00
#include "vendor/node/deps/uv/include/uv.h"
namespace atom {
2015-03-29 11:59:16 +00:00
// static
std::vector<std::string> AtomCommandLine::argv_;
2015-03-29 11:59:16 +00:00
// static
void AtomCommandLine::Init(int argc, const char* const* argv) {
2015-04-04 13:50:21 +00:00
// Hack around with the argv pointer. Used for process.title = "blah"
char** new_argv = uv_setup_args(argc, const_cast<char**>(argv));
2015-03-29 11:59:16 +00:00
for (int i = 0; i < argc; ++i) {
2015-04-04 13:50:21 +00:00
argv_.push_back(new_argv[i]);
2015-03-29 11:59:16 +00:00
}
}
} // namespace atom