MCPcopy Create free account
hub / github.com/AGWA/git-crypt / our_exe_path

Function our_exe_path

util-unix.cpp:128–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

126}
127
128std::string our_exe_path ()
129{
130 if (argv0[0] == '/') {
131 // argv[0] starts with / => it's an absolute path
132 return argv0;
133 } else if (std::strchr(argv0, '/')) {
134 // argv[0] contains / => it a relative path that should be resolved
135 char* resolved_path_p = realpath(argv0, nullptr);
136 std::string resolved_path(resolved_path_p);
137 free(resolved_path_p);
138 return resolved_path;
139 } else {
140 // argv[0] is just a bare filename => not much we can do
141 return argv0;
142 }
143}
144
145int exit_status (int wait_status)
146{

Callers 1

configure_git_filtersFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected