File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change 2424using bazel::tools::cpp::runfiles::Runfiles;
2525
2626int main (int argc, char *argv[]) {
27- std::string error;
28- std::unique_ptr<Runfiles> runfiles (Runfiles::Create (argv[0 ], &error));
29- if (runfiles == nullptr ) {
30- std::cerr << error << " \n " ;
31- return EXIT_FAILURE;
32- }
33-
34- std::string index_import_path =
27+ std::string index_import_path;
28+ std::unique_ptr<Runfiles> runfiles (Runfiles::Create (argv[0 ]));
29+ if (runfiles != nullptr ) {
30+ // We silently ignore errors here, we will report an error later if this
31+ // path is accessed
32+ index_import_path =
3533 runfiles->Rlocation (" build_bazel_rules_swift_index_import/index-import" );
34+ }
3635
3736 auto args = std::vector<std::string>(argv + 1 , argv + argc);
3837
You can’t perform that action at this time.
0 commit comments