File tree 3 files changed +14
-6
lines changed
3 files changed +14
-6
lines changed Original file line number Diff line number Diff line change 5
5
6
6
* support github installation
7
7
* bundle dependencies into ./local/ and ./onion.lock (json)
8
+ * quite option should also disable downlaod progress
8
9
9
10
* compile command: which compile source into phar file.
10
11
* dist: make php package.
Original file line number Diff line number Diff line change @@ -68,7 +68,9 @@ function resolvePearPackage($package)
68
68
69
69
$ channel = new \PEARX \Channel ( $ host , array (
70
70
'cache ' => \Onion \Application::getInstance ()->getCache (),
71
- 'downloader ' => \Onion \Downloader \CurlDownloaderFactory::create (),
71
+ 'downloader ' => \Onion \Downloader \CurlDownloaderFactory::create (
72
+ $ this ->logger ->level == 0 // quiet
73
+ ),
72
74
));
73
75
$ depPackage = $ channel ->findPackage ( $ packageName );
74
76
$ this ->resolvePearPackage ( $ depPackage );
@@ -96,7 +98,9 @@ function resolve( $package )
96
98
97
99
$ channel = new \PEARX \Channel ( $ host , array (
98
100
'cache ' => \Onion \Application::getInstance ()->getCache (),
99
- 'downloader ' => \Onion \Downloader \CurlDownloaderFactory::create (),
101
+ 'downloader ' => \Onion \Downloader \CurlDownloaderFactory::create (
102
+ $ this ->logger ->level == 0 // --quiet option
103
+ ),
100
104
));
101
105
$ depPackage = $ channel ->findPackage ( $ depPackageName );
102
106
Original file line number Diff line number Diff line change 5
5
6
6
class CurlDownloaderFactory
7
7
{
8
- static function create ()
8
+ static function create ($ quiet = false )
9
9
{
10
- $ d = new CurlDownloader ;
11
- $ d ->setProgressHandler ( new ProgressBar );
12
- return $ d ;
10
+ if ( $ quiet ) {
11
+ return new CurlDownloader ();
12
+ }
13
+ return new CurlDownloader ( array (
14
+ 'progress ' => new ProgressBar
15
+ ));
13
16
}
14
17
}
You can’t perform that action at this time.
0 commit comments