microsoft / homebrew-mssql-release

Other
92 stars 31 forks source link

[request] Add install option as alternative to ACCEPT_EULA envvar #86

Open chrisbarrett opened 2 years ago

chrisbarrett commented 2 years ago

Hello maintainers!

Would you accept a PR, or be interested in introducing, an installation option for this brew so that you could specify an unattended installation via the standard install API, in addition to the environment variable currently supported?

brew install mssql-tools --accept-eula

Use case

A motivating use case is trying to install this brew via nix-darwin with a multi-user-installation[^1]. Any approach I can find to inject this environment variable seems to require a hack somewhere.

{
  homebrew = {
    taps = [{
      name = "microsoft/mssql-release";
      clone_target = "https://github.com/Microsoft/homebrew-mssql-release";
    }];
    extraConfig = ''
      module Utils
        ENV['HOMEBREW_ACCEPT_EULA']='y'
      end
      brew "mssql-tools"
    '';
  };
}

Adding an install option would play better with the standard homebrew API. As a nix-darwin user I could then leverage the normal generated Caskfile:

{
  homebrew = {
    taps = [{
      name = "microsoft/mssql-release";
      clone_target = "https://github.com/Microsoft/homebrew-mssql-release";
    }];
    brews = [{
      name = "mssql-tools";
      args = [ "accept-eula" ];
    }];
  };
}

Thanks for your consideration and cheers for maintaining this brew. :)

[^1]: A multi-user installation involves farming the actual builds off to build processes that are running under non-login user accounts. See: https://nixos.org/manual/nix/stable/installation/multi-user.html

v-chojas commented 2 years ago

We can consider it for the next release.

David-Engel commented 11 months ago

Feel free to submit a PR and we'll move it forward.