Change working dir to dir of memgraph binary
Reviewers: buda Reviewed By: buda Subscribers: pullbot Differential Revision: https://phabricator.memgraph.io/D408
This commit is contained in:
parent
7403338f38
commit
a5e2ccb94f
@ -1,4 +1,5 @@
|
|||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
#include <experimental/filesystem>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#include "gflags/gflags.h"
|
#include "gflags/gflags.h"
|
||||||
@ -21,6 +22,7 @@
|
|||||||
#include "utils/stacktrace/log.hpp"
|
#include "utils/stacktrace/log.hpp"
|
||||||
#include "utils/terminate_handler.hpp"
|
#include "utils/terminate_handler.hpp"
|
||||||
|
|
||||||
|
namespace fs = std::experimental::filesystem;
|
||||||
using endpoint_t = io::network::NetworkEndpoint;
|
using endpoint_t = io::network::NetworkEndpoint;
|
||||||
using socket_t = io::network::Socket;
|
using socket_t = io::network::Socket;
|
||||||
using session_t = communication::bolt::Session<socket_t>;
|
using session_t = communication::bolt::Session<socket_t>;
|
||||||
@ -43,6 +45,7 @@ void throw_and_stacktace(std::string message) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
|
fs::current_path(fs::path(argv[0]).parent_path());
|
||||||
gflags::ParseCommandLineFlags(&argc, &argv, true);
|
gflags::ParseCommandLineFlags(&argc, &argv, true);
|
||||||
// logging init
|
// logging init
|
||||||
#ifdef SYNC_LOGGER
|
#ifdef SYNC_LOGGER
|
||||||
|
Loading…
Reference in New Issue
Block a user