在 bash 脚本内执行命令,参数内有空格
我遇到以下问题。当我从 Bash 脚本执行此命令 sfdx profile:field:add -n "Account.Test" -m re -p "Test" 时,一切正常。
但是,当我尝试执行以下命令时: sfdx 配置文件:字段:add -n "Account.Test" -m re -p "Test Test"
我收到此错误:“C:\Program”未被识别为内部或外部命令
当我在终端中运行相同的命令时,它工作正常。只是当我将其放入 bash 脚本中时,才会发生此错误。
目前在 Windows 10 上运行此错误
。我 100% 确定这是最后一个参数中的空格,我只是不确定如何解决它。有人可以帮忙吗?
I'm having the following issue. When I execute this command sfdx profile:field:add -n "Account.Test" -m re -p "Test"
from a Bash script, it's all fine.
However, when I try to execute the following:sfdx profile:field:add -n "Account.Test" -m re -p "Test Test"
I get this error: 'C:\Program' is not recognized as an internal or external command
When I run the same command in the terminal, it works fine. It's just when I put it inside a bash script that this error happens.
Currently running this on Windows 10.
I'm 100% sure it's the space in that last parameter, I am just not sure how to get around it. Can anyone help?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论