Update source/src/commands/validate-template.cpp
All checks were successful
Build-Test-Publish / build (linux/amd64) (push) Successful in 38s
Build-Test-Publish / build (linux/arm64) (push) Successful in 1m6s

This commit is contained in:
j
2026-01-26 21:50:06 +13:00
parent fa8f40fecd
commit b65309fd10

View File

@@ -40,7 +40,7 @@ Validates a dropshell template by checking:
1. Required files exist (install.sh, uninstall.sh, status.sh, config files)
2. Shell script linting via shellcheck (run in container)
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
6. uninstall.sh preserves data volumes
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
info << "=== Required Variables in service.env ===" << std::endl;
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) {
ValidationResult result = check_env_var_defined(service_env_path, var_name);
if (result.passed) {