MCPcopy Create free account
hub / github.com/duckdb/duckdb / ProcessDuckDBRC

Method ProcessDuckDBRC

tools/shell/shell.cpp:2925–2942  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2923}
2924
2925bool ShellState::ProcessDuckDBRC(const char *file) {
2926 string path;
2927 bool is_default = false;
2928 if (!file) {
2929 // use default .duckdbrc path
2930 path = ShellState::GetDefaultDuckDBRC();
2931 if (path.empty()) {
2932 // could not find home directory - return
2933 PrintF(PrintOutput::STDERR, "-- warning: cannot find home directory;"
2934 " cannot read ~/.duckdbrc\n");
2935 return true;
2936 }
2937 file = path.c_str();
2938 is_default = true;
2939 }
2940 duckdb_rc_path = file;
2941 return ProcessFile(file, InputMode::DUCKDB_RC, is_default);
2942}
2943
2944#ifdef HAVE_LINENOISE
2945/*

Callers 1

RunShellFunction · 0.80

Calls 3

ProcessFileFunction · 0.85
c_strMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected