Merge pull request #2440 from jdrouhard/dry-run-fix

fix: don't attempt to write and stat the lock file during dry runs