Skip to content

Commit 5af8fb7

Browse files
committed
revert(alchemist): streamline download result handling in transmute function
1 parent 5fc9f37 commit 5af8fb7

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

automation-tools/alchemist/alchemist.sh

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,8 @@ transmute() {
6363

6464
# Download stage for this object
6565
download_result=$(process_download -t "$source_type" -u "$source_url" -d "$source_dest" -v "$SOURCE_VERSION")
66-
downloaded_file=$(echo "$download_result" | grep "^DOWNLOADED_FILE=" | cut -d= -f2)
67-
downloaded_version=$(echo "$download_result" | grep "^DOWNLOADED_VERSION=" | cut -d= -f2)
68-
69-
if [[ -n "${downloaded_file:-}" ]]; then
70-
export DOWNLOADED_FILE="$downloaded_file"
71-
fi
72-
73-
# Some downloaders (e.g. local/http) don't emit DOWNLOADED_VERSION.
74-
# In that case, keep the recipe-provided SOURCE_VERSION instead of clobbering it.
75-
if [[ -n "${downloaded_version:-}" ]]; then
76-
export SOURCE_VERSION="$downloaded_version"
77-
fi
66+
export DOWNLOADED_FILE=$(echo "$download_result" | grep "^DOWNLOADED_FILE=" | cut -d= -f2)
67+
export SOURCE_VERSION=$(echo "$download_result" | grep "^DOWNLOADED_VERSION=" | cut -d= -f2)
7868

7969
# Extraction stage for this object
8070
extraction_result=$(process_extract -f "$DOWNLOADED_FILE" -d "$source_dest" -t "$extraction_type")

0 commit comments

Comments
 (0)