sg: fix lint command subcommands
Created by: jhchabran
Classic case of a closure in a for loop capturing the wrong thing (cc @davejrt as this is a common mistake that isn't always easy to spot, you probably want to take a look).
Test plan
- Tested locally, was puzzled why
sg lint docker
was giving me shell errors.