使用 sing-box check 的返回值来判断配置文件是否正确 #984
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
目前 sing-box check 有时会输出一些警告信息,但是这些不影响配置文件正常使用。
但是之前采用了校验输出内容是否为空的方式来判断配置文件是否正确,这导致一部分会产生警告的可以正常使用的配置文件无法使用。
现在改为了检查 sing-box check 的返回值的方式来判断,更加准确。