correctly capture the output of --local commands