public static function confirm($msg) {
        print $msg . ' > ';
        system('stty -icanon');
        $handle = fopen('php://stdin', 'r');
        $char = fgetc($handle);
        system('stty icanon');
        print "\n";

        $allowedResponses = array('y', 'Y', 'n', 'N');
        if (!in_array($char, $allowedResponses)) {
            // nag 'em some more
            Garp_Cli::errorOut('Please respond with a clear y or n');
            return static::confirm($msg);
        }
        return $char === 'y' || $char === 'Y';
    }