Merge pull request #2468 from khaneliman/persistent-rename

deprecate persistent_workspaces in favor of persistent-workspaces
This commit is contained in:
Alexis Rouillard
2023-09-11 09:22:07 +02:00
committed by GitHub
5 changed files with 34 additions and 9 deletions

View File

@ -257,7 +257,14 @@ void Workspaces::remove_workspace(std::string name) {
void Workspaces::fill_persistent_workspaces() {
if (config_["persistent_workspaces"].isObject()) {
const Json::Value persistent_workspaces = config_["persistent_workspaces"];
spdlog::warn(
"persistent_workspaces is deprecated. Please change config to use persistent-workspaces.");
}
if (config_["persistent-workspaces"].isObject() || config_["persistent_workspaces"].isObject()) {
const Json::Value persistent_workspaces = config_["persistent-workspaces"].isObject()
? config_["persistent-workspaces"]
: config_["persistent_workspaces"];
const std::vector<std::string> keys = persistent_workspaces.getMemberNames();
for (const std::string &key : keys) {