Search code examples
bashmacosmacports

Macports: assume yes on "Continue Y/N" prompts?


I'm a complete noob when it comes to macports. I've just started a new job, they've given me a new work laptop and a basic bash script filled with just over 20,000 ports. I'm running macports 2.4.1 on OS X Sierra.

Occasionally a port wants my password, usually to allow a port to run on startup. So simply creating some sort of script to press y and enter over and over isn't going to work very well.

I've tried to search around but most people are looking for methods to stop macports installing dependencies altogether which is not what i'm after, I need it to simply assume that I do want to install all dependencies without asking for a prompt. I'm not sure if this is something I could do with an argument or by editing a config file somewhere.. or something that's possible at all.

Any help appreciated :)


Solution

  • Add the -N flag to the port command so "interactive questions are not asked."

    From man port:

       -N
           Non-interactive mode, interactive questions are not asked