$bash = ExecutableFinder::findInDefaultPaths( 'bash' );
if ( !wfIsWindows() && $bash ) {
$retval = false;
- $encPrompt = wfEscapeShellArg( $prompt );
+ $encPrompt = Shell::escape( $prompt );
$command = "read -er -p $encPrompt && echo \"\$REPLY\"";
- $encCommand = wfEscapeShellArg( $command );
- $line = wfShellExec( "$bash -c $encCommand", $retval, [], [ 'walltime' => 0 ] );
+ $encCommand = Shell::escape( $command );
+ $line = Shell::escape( "$bash -c $encCommand", $retval, [], [ 'walltime' => 0 ] );
if ( $retval == 0 ) {
return $line;