使用 shellcheck 进行 AppleScript 调试

发布于 2025-01-16 11:58:34 字数 709 浏览 3 评论 0原文

我是一个使用脚本编辑器的新手。我什至不知道这是用什么语言编写的,但我正在尝试使用 shellcheck.net 来调试它:

var=value LDMIcon to path to resource "LDM_Icon.icns" in bundle (path to me)
set CurrentOS to do shell script "sw_vers -productVersion | cut -c 1-4"

shellcheck 这样说;

var=value LDMIcon to path to resource "LDM_Icon.icns" in bundle (path to me)
>>                                                              ^-- SC1036 (error): '(' is invalid here. Did you forget to escape it?
>>                                                              ^-- SC1088 (error): Parsing stopped here. Invalid use of parentheses?

我尝试使用 github 提示(SC1036 等)修复它,但没有成功。有人可以帮忙吗?

谢谢

I am a complete novice using Script Editor. I don't even know what language this is written in, but I'm trying to use shellcheck.net to debug this:

var=value LDMIcon to path to resource "LDM_Icon.icns" in bundle (path to me)
set CurrentOS to do shell script "sw_vers -productVersion | cut -c 1-4"

shellcheck says this;

var=value LDMIcon to path to resource "LDM_Icon.icns" in bundle (path to me)
>>                                                              ^-- SC1036 (error): '(' is invalid here. Did you forget to escape it?
>>                                                              ^-- SC1088 (error): Parsing stopped here. Invalid use of parentheses?

I've tried to fix it using the github tips (SC1036 etc) with no luck. Can anyone help?

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文