From 3762f11fa173d9852706830fcdbe650e08a89d12 Mon Sep 17 00:00:00 2001 From: Kateryna Oblakevych Date: Mon, 18 Mar 2024 12:33:14 +0200 Subject: [PATCH] fix: preserve hierarchy output --- .../cli/commands/actions/DownloadSourcesAction.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/crowdin/cli/commands/actions/DownloadSourcesAction.java b/src/main/java/com/crowdin/cli/commands/actions/DownloadSourcesAction.java index 95fb2f9a..cc254df3 100644 --- a/src/main/java/com/crowdin/cli/commands/actions/DownloadSourcesAction.java +++ b/src/main/java/com/crowdin/cli/commands/actions/DownloadSourcesAction.java @@ -88,6 +88,10 @@ public void act(Outputter out, PropertiesWithFiles properties, ProjectClient cli return; } + if (!plainView && !properties.getPreserveHierarchy()) { + out.println(WARNING.withIcon(RESOURCE_BUNDLE.getString("message.download_sources.preserve_hierarchy_warning"))); + } + CrowdinProjectFull project = ConsoleSpinner .execute(out, "message.spinner.fetching_project_info", "error.collect_project_info", this.noProgress, this.plainView, () -> client.downloadFullProject(this.branchName)); @@ -96,10 +100,6 @@ public void act(Outputter out, PropertiesWithFiles properties, ProjectClient cli throw new RuntimeException(RESOURCE_BUNDLE.getString("message.no_file_string_project")); } - if (!plainView && !properties.getPreserveHierarchy()) { - out.println(WARNING.withIcon(RESOURCE_BUNDLE.getString("message.download_sources.preserve_hierarchy_warning"))); - } - Long branchId = Optional.ofNullable(project.getBranch()) .map(Branch::getId) .orElse(null);