Skip to content

Commit 6cc9020

Browse files
committed
Remove --output-level quiet from azcopy calls
Signed-off-by: adamrtalbot <12817534+adamrtalbot@users.noreply.github.com>
1 parent 0053f94 commit 6cc9020

File tree

2 files changed

+15
-14
lines changed

2 files changed

+15
-14
lines changed

plugins/nf-azure/src/main/nextflow/cloud/azure/file/AzBashLib.groovy

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,29 +70,29 @@ class AzBashLib extends BashFunLib<AzBashLib> {
7070
azcopy cp "$name" "$target/$dir_name?$AZ_SAS" --recursive --block-blob-tier $AZCOPY_BLOCK_BLOB_TIER --block-size-mb $AZCOPY_BLOCK_SIZE_MB
7171
fi
7272
else
73-
azcopy cp --output-level quiet "$name" "$target/$name?$AZ_SAS" --block-blob-tier $AZCOPY_BLOCK_BLOB_TIER --block-size-mb $AZCOPY_BLOCK_SIZE_MB
73+
azcopy cp "$name" "$target/$name?$AZ_SAS" --block-blob-tier $AZCOPY_BLOCK_BLOB_TIER --block-size-mb $AZCOPY_BLOCK_SIZE_MB
7474
fi
7575
}
76-
76+
7777
nxf_az_download() {
7878
local source=$1
7979
local target=$2
8080
local basedir=$(dirname $2)
8181
mkdir -p "$basedir"
82-
82+
8383
# Try to download as file first, let azcopy handle the detection
84-
if ! azcopy cp --output-level quiet "$source?$AZ_SAS" "$target"; then
84+
if ! azcopy cp "$source?$AZ_SAS" "$target"; then
8585
# If failed, remove any partial target and try as directory
8686
rm -rf "$target"
8787
mkdir -p "$target"
88-
if ! azcopy cp --output-level quiet"$source/*?$AZ_SAS" "$target" --recursive; then
88+
if ! azcopy cp "$source/*?$AZ_SAS" "$target" --recursive; then
8989
rm -rf "$target"
9090
>&2 echo "Unable to download path: $source"
9191
exit 1
9292
fi
9393
fi
9494
}
95-
'''.stripIndent(true)
95+
'''.stripIndent()
9696
}
9797

9898
String render() {

plugins/nf-azure/src/test/nextflow/cloud/azure/batch/AzFileCopyStrategyTest.groovy

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -179,18 +179,19 @@ class AzFileCopyStrategyTest extends Specification {
179179
local source=$1
180180
local target=$2
181181
local basedir=$(dirname $2)
182-
local ret
183182
mkdir -p "$basedir"
184183
185-
ret=$(azcopy cp "$source?$AZ_SAS" "$target" 2>&1) || {
186-
## if fails check if it was trying to download a directory
187-
mkdir -p $target
188-
azcopy cp "$source/*?$AZ_SAS" "$target" --recursive >/dev/null || {
189-
rm -rf $target
184+
# Try to download as file first, let azcopy handle the detection
185+
if ! azcopy cp "$source?$AZ_SAS" "$target"; then
186+
# If failed, remove any partial target and try as directory
187+
rm -rf "$target"
188+
mkdir -p "$target"
189+
if ! azcopy cp "$source/*?$AZ_SAS" "$target" --recursive; then
190+
rm -rf "$target"
190191
>&2 echo "Unable to download path: $source"
191192
exit 1
192-
}
193-
}
193+
fi
194+
fi
194195
}
195196
196197
'''.stripIndent(true)

0 commit comments

Comments
 (0)