Yes, there is another call of this function for an async scneario and in that case there is no logger present. Notice that logger argument of BuildExternalCommandExecutable has a null default, you need to scroll to see it in the diff.