mvdan / sh

A shell parser, formatter, and interpreter with bash support; includes shfmt
https://pkg.go.dev/mvdan.cc/sh/v3
BSD 3-Clause "New" or "Revised" License
6.97k stars 332 forks source link

Implement -O and -G tests #1080

Open theclapp opened 1 week ago

theclapp commented 1 week ago

Implement -O (syntax.TsUsrOwn, "file exists and is owned by the effective user id") and -G (syntax.TsGrpOwn, "file exists and is owned by the effective group id") tests, for non-Windows only.

Under Windows, still panics, as before.

-O and -G are hard/not applicable for Windows, since it doesn't really have the concept of "file owners", only ACLs, and it's not clear how to translate one to the other.

theclapp commented 1 week ago

Oops, this won't even build under Windows. My bad. I'll get back to you.