test: Update 4 files
Some checks failed
Build-Test-Publish / build (linux/arm64) (push) Failing after 13s
Build-Test-Publish / build (linux/amd64) (push) Failing after 31s
Build-Test-Publish / test-install-from-scratch (linux/amd64) (push) Has been skipped
Build-Test-Publish / test-install-from-scratch (linux/arm64) (push) Has been skipped

This commit is contained in:
Your Name
2025-06-25 18:45:31 +12:00
parent a12270f6c2
commit 6ed73ef5a8
4 changed files with 34 additions and 13 deletions

View File

@ -57,14 +57,23 @@ int update()
int main(int argc, char* argv[]) {
try {
std::cout << "Dehydrate version " << VERSION << std::endl;
Args args = parse_args(argc, argv);
// Handle version request (output only version)
if (args.version) {
std::cout << VERSION << std::endl;
return 0;
}
// Handle update request
if (args.update) {
std::cout << "Dehydrate version " << VERSION << std::endl;
return update();
}
// Show version for normal operations
std::cout << "Dehydrate version " << VERSION << std::endl;
std::filesystem::path src(args.source);
if (!std::filesystem::exists(src)) {
std::cerr << "Source does not exist: " << args.source << std::endl;