| 237 | } |
| 238 | |
| 239 | void ConfigPackageUtility::DeleteStage(const String& packageName, const String& stageName) |
| 240 | { |
| 241 | String path = GetPackageDir() + "/" + packageName + "/" + stageName; |
| 242 | |
| 243 | if (!Utility::PathExists(path)) |
| 244 | BOOST_THROW_EXCEPTION(std::invalid_argument("Stage does not exist.")); |
| 245 | |
| 246 | if (GetActiveStage(packageName) == stageName) |
| 247 | BOOST_THROW_EXCEPTION(std::invalid_argument("Active stage cannot be deleted.")); |
| 248 | |
| 249 | Utility::RemoveDirRecursive(path); |
| 250 | } |
| 251 | |
| 252 | std::vector<String> ConfigPackageUtility::GetStages(const String& packageName) |
| 253 | { |
nothing calls this directly
no test coverage detected