buildPasswordedCommand static method

  1. @visibleForTesting
String buildPasswordedCommand(
  1. String commands
)

Build one sudo invocation whose child cannot read the password stream.

Implementation

@visibleForTesting
static String buildPasswordedCommand(String commands) =>
    "sudo -Skp '' sh -c "
    '${_shellQuote('exec 0</dev/null; $commands')}';