Revert process_cmd to upstream master version