DomT4 / homebrew-autoupdate

:tropical_drink: An easy, convenient way to automatically update Homebrew.
BSD 2-Clause "Simplified" License
1.01k stars 55 forks source link

If there was no cask installed, when invoking the `start --upgrade` command, new casks will never be upgraded #117

Closed swissbuechi closed 8 months ago

swissbuechi commented 10 months ago

Would it harm if we would always run brew upgrade --cask -v even if no cask is installed? Also, aren't there formulae which cloud also require SUDO_ASKPASS, to be auto upgraded? Also the hint message should always be displayed, and not only when casks are already installed.

The following lines would need to be slightly updated. start.rb

    if args.upgrade?
      auto_args << " && #{Autoupdate::Core.brew} upgrade --formula -v"

      if (HOMEBREW_PREFIX/"Caskroom").exist?
        if ENV["SUDO_ASKPASS"].nil? && !args.sudo?
          opoo <<~EOS
            Please note if you use Casks that require `sudo` to upgrade,
            you need to use `--sudo` or define a custom `SUDO_ASKPASS`
            environment variable.

          EOS
        end

        greedy = args.greedy? ? " --greedy" : ""
        auto_args << " && #{Autoupdate::Core.brew} upgrade --cask -v#{greedy}"
      end
github-actions[bot] commented 10 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

swissbuechi commented 10 months ago

Not stale

github-actions[bot] commented 9 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

swissbuechi commented 9 months ago

not stale

github-actions[bot] commented 8 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

swissbuechi commented 8 months ago

not stale