From 60139a1874ee183d7d8a691268c8d67fb4801c32 Mon Sep 17 00:00:00 2001 From: Alexander Zhirov Date: Thu, 29 May 2025 16:23:47 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=BD=D0=BE=D0=B2=D0=B0=D1=8F=20=D0=BA=D0=BE?= =?UTF-8?q?=D0=BC=D0=B0=D0=BD=D0=B4=D0=B0=20size=20=D0=B4=D0=BB=D1=8F=20?= =?UTF-8?q?=D0=BF=D0=BE=D0=BB=D1=83=D1=87=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=B8?= =?UTF-8?q?=D0=BD=D1=84=D0=BE=D1=80=D0=BC=D0=B0=D1=86=D0=B8=D0=B8=20=D0=B8?= =?UTF-8?q?=20=D1=80=D0=B0=D0=B7=D0=BC=D0=B5=D1=80=D0=B5=20=D1=80=D0=B5?= =?UTF-8?q?=D0=BF=D0=BE=D0=B7=D0=B8=D1=82=D0=BE=D1=80=D0=B8=D1=8F=20=D1=81?= =?UTF-8?q?=20=D1=85=D1=80=D0=B0=D0=BD=D0=B8=D0=BC=D1=8B=D0=BC=D0=B8=20?= =?UTF-8?q?=D1=81=D0=BD=D0=B8=D0=BC=D0=BA=D0=B0=D0=BC=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/app.d | 12 +++++++++++- source/snag/version_.d | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/source/app.d b/source/app.d index 6332a02..a79b3f8 100644 --- a/source/app.d +++ b/source/app.d @@ -40,6 +40,7 @@ int main(string[] args) ) .add(new Command("status", "Checking the status of tracked files")) .add(new Command("diff", "Show changed data")) + .add(new Command("size", "Size of snapshots")) .add(new Command("import", "Import snapshot from a tar.gz archive") .add(new Argument("archive", "The path to the tar.gz archive file").required) .add(new Option("c", "comment", "Specify comment") @@ -138,7 +139,7 @@ int main(string[] args) .optional ) ) - .add(new Option("c", "config", "Сonfiguration file path") + .add(new Option("c", "config", "Configuration file path") .optional .validateEachWith( opt => opt.exists && opt.isFile, @@ -168,6 +169,9 @@ int main(string[] args) .on("diff", diff => snag.diff() ) + .on("size", size => + snag.size() + ) .on("status", status => snag.status() ) @@ -231,6 +235,12 @@ int main(string[] args) } catch (SnagException e) { e.print(); return EXIT_FAILURE; + } catch (Exception e) { + writeln( + "AN UNEXPECTED ERROR HAS OCCURRED! PLEASE REPORT IT TO THE AUTHOR OF THE SNAG!\n\n", + e + ); + return EXIT_FAILURE; } return EXIT_SUCCESS; diff --git a/source/snag/version_.d b/source/snag/version_.d index b3c91c4..b4f3fd3 100644 --- a/source/snag/version_.d +++ b/source/snag/version_.d @@ -1,3 +1,3 @@ module snag.version_; -enum snagVersion = "0.0.12"; +enum snagVersion = "0.0.13";