Skip to content

Commit 879f460

Browse files
committed
Pake fixes
1 parent 719bf2e commit 879f460

File tree

4 files changed

+24
-24
lines changed

4 files changed

+24
-24
lines changed

includes/pakeFunction.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ function pake_echo_comment($text)
377377
{
378378
if (pakeApp::get_instance()->get_verbose())
379379
{
380-
echo sprintf(pakeColor::colorize(' # %s', 'COMMENT'), $text, pake_STDOUT())."\n";
380+
echo sprintf(pakeColor::colorize(' # %s', 'COMMENT', pake_STDOUT()), $text)."\n";
381381
}
382382
}
383383

@@ -424,9 +424,9 @@ function pake_STDERR() {
424424

425425
// close the streams on script termination
426426
register_shutdown_function(function () {
427-
fclose(STDIN);
428-
fclose(STDOUT);
429-
fclose(STDERR);
427+
fclose(pake_STDIN());
428+
fclose(pake_STDOUT());
429+
fclose(pake_STDERR());
430430
return true;
431431
});
432432
}

lib/vendor/pake/pakeColor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ static function style($name, $options = array())
2929
self::$styles[$name] = $options;
3030
}
3131

32-
static function colorize($text = '', $parameters = array(), $stream)
32+
static function colorize($text, $parameters, $stream)
3333
{
3434
$stream = $stream ?: pake_STDOUT();
3535
// disable colors if not supported (windows or non tty console)

lib/vendor/pake/tasks/pakePhingTask.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public static function call_phing($task, $target, $build_file = '', $options = a
4242
$args[] = $target;
4343
}
4444

45-
if (DIRECTORY_SEPARATOR != '\\' && (function_exists('posix_isatty') && @posix_isatty(STDOUT)))
45+
if (DIRECTORY_SEPARATOR != '\\' && (function_exists('posix_isatty') && @posix_isatty(pake_STDOUT())))
4646
{
4747
$args[] = '-logger';
4848
$args[] = 'phing.listener.AnsiColorLogger';

lib/vendor/phing/system/io/ConsoleReader.php

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,47 +16,47 @@
1616
*
1717
* This software consists of voluntary contributions made by many individuals
1818
* and is licensed under the LGPL. For more information please see
19-
* <http://phing.info>.
19+
* <http://phing.info>.
2020
*/
21-
21+
2222
include_once 'phing/system/io/Reader.php';
2323

2424
/**
2525
* Convenience class for reading console input.
26-
*
26+
*
2727
* @author Hans Lellelid <[email protected]>
2828
* @author Matthew Hershberger <[email protected]>
2929
* @version $Revision: 1.4 $
3030
* @package phing.system.io
3131
*/
3232
class ConsoleReader extends Reader {
33-
33+
3434
function readLine() {
35-
36-
$out = fgets(STDIN); // note: default maxlen is 1kb
35+
36+
$out = fgets(pake_STDIN()); // note: default maxlen is 1kb
3737
$out = rtrim($out);
3838

3939
return $out;
4040
}
41-
41+
4242
/**
43-
*
43+
*
4444
* @param int $len Num chars to read.
4545
* @return string chars read or -1 if eof.
4646
*/
4747
function read($len = null) {
48-
49-
$out = fread(STDIN, $len);
50-
51-
48+
49+
$out = fread(pake_STDIN(), $len);
50+
51+
5252
return $out;
5353
// FIXME
5454
// read by chars doesn't work (yet?) with PHP stdin. Maybe
5555
// this is just a language feature, maybe there's a way to get
5656
// ability to read chars w/o <enter> ?
57-
58-
}
59-
57+
58+
}
59+
6060
function close() {
6161
// STDIN is always open
6262
}
@@ -70,9 +70,9 @@ function open() {
7070
* @return boolean
7171
*/
7272
function eof() {
73-
return feof(STDIN);
74-
}
75-
73+
return feof(pake_STDIN());
74+
}
75+
7676
/**
7777
* Returns path to file we are reading.
7878
* @return string

0 commit comments

Comments
 (0)