# shellcheck shell=dash

___x_cmd_winget___install(){
    ___x_cmd pwsh <"$___X_CMD_ROOT_MOD/winget/lib/install.ps1"
}


___x_cmd_winget_install(){
    if [ "$#" -eq 0 ]; then
        if ___x_cmd_is_stdout2tty && ___x_cmd_runmode_allow_chatty; then
            ___x_cmd_winget_ls___all
            return
        else
            ___x_cmd help -m winget install >&2
            return 64
        fi
    fi

    ___x_cmd_winget___proxy run ___x_cmd_winget___bin "install" "$@"
}
