Skip to content

Export engine to igox , update igox build tool#665

Merged
JiepengTan merged 1 commit intogoplus:devfrom
JiepengTan:pr_fix_igox_missing_pkg
May 22, 2025
Merged

Export engine to igox , update igox build tool#665
JiepengTan merged 1 commit intogoplus:devfrom
JiepengTan:pr_fix_igox_missing_pkg

Conversation

@JiepengTan
Copy link
Copy Markdown
Contributor

@JiepengTan JiepengTan commented May 22, 2025

fix Failed to resolve package import xxxx
image

@JiepengTan JiepengTan requested a review from nighca May 22, 2025 07:07
Comment thread cmd/igox/build.sh
@@ -1,9 +1,10 @@
#!/bin/bash
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd $SCRIPT_DIR
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: Use 'cd ... || exit' or 'cd ... || return' in case cd fails. [SC2164]

Details

lint 解释

这个lint结果表明在脚本中使用了cd ...命令,但没有处理可能的失败情况。如果cd命令执行失败,脚本将继续执行后续的命令,这可能会导致意外的行为。

错误用法

cd /path/to/directory
# 如果 cd 失败,脚本会继续执行
echo "Directory changed"

在这个示例中,如果/path/to/directory不存在或无法访问,脚本将继续执行并输出"Directory changed",这可能会导致错误。

正确用法

cd /path/to/directory || exit 1
# 或者
cd /path/to/directory || return 1
echo "Directory changed"

在这个示例中,如果cd命令失败,脚本将立即退出(使用exit 1)或返回一个非零状态码(使用return 1),从而避免继续执行后续的命令。


💡 以上内容由 AI 辅助生成,如有疑问欢迎反馈交流

@JiepengTan JiepengTan merged commit 1d3bafd into goplus:dev May 22, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants