Update source/src/commands/validate-template.cpp
This commit is contained in:
@@ -40,7 +40,7 @@ Validates a dropshell template by checking:
|
|||||||
1. Required files exist (install.sh, uninstall.sh, status.sh, config files)
|
1. Required files exist (install.sh, uninstall.sh, status.sh, config files)
|
||||||
2. Shell script linting via shellcheck (run in container)
|
2. Shell script linting via shellcheck (run in container)
|
||||||
3. Scripts source common.sh
|
3. Scripts source common.sh
|
||||||
4. Required variables in service.env (SSH_USER, CONTAINER_NAME)
|
4. Required variables in service.env (SSH_USER)
|
||||||
5. Backup/restore script pairing
|
5. Backup/restore script pairing
|
||||||
6. uninstall.sh preserves data volumes
|
6. uninstall.sh preserves data volumes
|
||||||
7. Scripts are non-interactive (no read -p, select, etc.)
|
7. Scripts are non-interactive (no read -p, select, etc.)
|
||||||
@@ -500,7 +500,7 @@ int validate_handler(const CommandContext& ctx) {
|
|||||||
// Step 5: Check required environment variables in service.env
|
// Step 5: Check required environment variables in service.env
|
||||||
info << "=== Required Variables in service.env ===" << std::endl;
|
info << "=== Required Variables in service.env ===" << std::endl;
|
||||||
std::filesystem::path service_env_path = template_path / "config" / filenames::service_env;
|
std::filesystem::path service_env_path = template_path / "config" / filenames::service_env;
|
||||||
std::vector<std::string> required_service_vars = {"SSH_USER", "CONTAINER_NAME"};
|
std::vector<std::string> required_service_vars = {"SSH_USER"};
|
||||||
for (const auto& var_name : required_service_vars) {
|
for (const auto& var_name : required_service_vars) {
|
||||||
ValidationResult result = check_env_var_defined(service_env_path, var_name);
|
ValidationResult result = check_env_var_defined(service_env_path, var_name);
|
||||||
if (result.passed) {
|
if (result.passed) {
|
||||||
|
|||||||
Reference in New Issue
Block a user