@@ -380,7 +380,7 @@ enum ContainerCmdType {
380380 // and don't require splitting output with ScriptConstants.separator
381381 ;
382382
383- String exec (ContainerType type, {bool sudo = false , bool includeStats = false , String ? password }) {
383+ String exec (ContainerType type, {bool includeStats = false }) {
384384 final baseCmd = switch (this ) {
385385 ContainerCmdType .version => '${type .name } version $_jsonFmt ' ,
386386 ContainerCmdType .ps => switch (type) {
@@ -398,18 +398,12 @@ enum ContainerCmdType {
398398 ContainerCmdType .images => '${type .name } image ls $_jsonFmt ' ,
399399 };
400400
401- if (sudo && password != null ) {
402- return _buildSudoCmd (baseCmd, password);
403- }
404- if (sudo) {
405- return 'sudo -S $baseCmd ' ;
406- }
407401 return baseCmd;
408402 }
409403
410404 static String execAll (ContainerType type, {bool sudo = false , bool includeStats = false , String ? password}) {
411405 final commands = ContainerCmdType .values
412- .map ((e) => e.exec (type, sudo : false , includeStats: includeStats))
406+ .map ((e) => e.exec (type, includeStats: includeStats))
413407 .join ('\n echo ${ScriptConstants .separator }\n ' );
414408
415409 final needsShWrapper = commands.contains ('\n ' ) || commands.contains ('echo ${ScriptConstants .separator }' );
0 commit comments