Gunman flees after shooting man during home invasion