Instead of setting preferLocalBuild & allowSubstitutes explicitly, use runCommandLocal which sets the same options.