Skip to content

Commit 8ef7fb2

Browse files
committed
fix az functionapp deployment source config-zip uploaded blob only has file path as content
1 parent 617ddcf commit 8ef7fb2

File tree

1 file changed

+6
-1
lines changed
  • src/azure-cli/azure/cli/command_modules/appservice

1 file changed

+6
-1
lines changed

src/azure-cli/azure/cli/command_modules/appservice/custom.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import ssl
2020
import sys
2121
import uuid
22+
import os
2223
from functools import reduce
2324
import invoke
2425
from nacl import encoding, public
@@ -1666,7 +1667,11 @@ def progress_callback(current, total):
16661667
progress_message = 'Uploading {} {}%'.format(progress_bar, percents)
16671668
cmd.cli_ctx.get_progress_controller().add(message=progress_message)
16681669

1669-
blob_client = container_client.upload_blob(blob_name, src, validate_content=True, progress_hook=progress_callback)
1670+
blob_client = None
1671+
with open(os.path.realpath(os.path.expanduser(src)), 'rb') as fs:
1672+
zip_content = fs.read()
1673+
blob_client = container_client.upload_blob(blob_name, zip_content, validate_content=True,
1674+
progress_hook=progress_callback)
16701675

16711676
now = datetime.datetime.utcnow()
16721677
blob_start = now - datetime.timedelta(minutes=10)

0 commit comments

Comments
 (0)