From 976f01dff43cd4f5b9e66852665914da4d6d3940 Mon Sep 17 00:00:00 2001 From: Kateryna Oblakevych Date: Mon, 18 Mar 2024 14:20:29 +0200 Subject: [PATCH] fix: preserve hierarchy output (#738) --- .../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);