vala: correctly judge whether to color output on windows

Merged 周 乾康 requested to merge wszqkzqk/vala:win_atty into main

close #1383 (closed)

On windows, we should use _isatty instead of isatty. Also, the result of the function may be integers other than 0 and 1, so we need to convert it to bool instead of use func (pat) == 1.

Edited by 周 乾康

Merge request reports