gpt4 book ai didi

bash - Azure CLI az functionapp config appsettings - appsetting 中的空格

转载 作者:行者123 更新时间:2023-12-02 23:17:49 29 4
gpt4 key购买 nike

我正在使用 az functionapp config appsettings 自动创建我的 Azure Function 设置。我的设置之一是其中包含空格的 SQL 连接字符串。连接字符串中的空格导致加载问题,因为每个应用程序设置均由空格分隔。

有人可以告诉我为什么这有效吗az functionapp config appsettings set --resource-group "Test"-n "rbasxxtest1"--settings Setting1='测试值'

但这不是吗?Setting1Value='测试值'az functionapp config appsettings set --resource-group "AzureOE"-n "rbasxxtest1"--settings Setting1=$Setting1Value

这是我收到的错误命令因意外错误而失败。这是回溯:

没有足够的值来解压(预期为 2,实际为 1)回溯(最近一次调用最后一次): 文件“/opt/az/lib/python3.6/site-packages/azure/cli/core/util.py”,第 244 行,位于 shell_safe_json_parse

谢谢

理查德

最佳答案

我需要双引号

Setting1Value="测试值"回显设置值= $Setting1Valueaz functionapp config appsettings set --resource-group "AzureOE"-n "rbasxxtest1"--settings Setting1="$Setting1Value"

关于bash - Azure CLI az functionapp config appsettings - appsetting 中的空格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57762136/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com