Refactor install_command_spec