projects
/
pharext
/
pharext
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
fix normal/verbose/quiet output
[pharext/pharext]
/
src
/
pharext
/
Task
/
PharCompress.php
diff --git
a/src/pharext/Task/PharCompress.php
b/src/pharext/Task/PharCompress.php
index ea0607f39a6e9291a91204b9cdcfa7a97d0a2e20..1b6571fe835c57d08d4e9280ee6fad696e4dccf9 100644
(file)
--- a/
src/pharext/Task/PharCompress.php
+++ b/
src/pharext/Task/PharCompress.php
@@
-55,15
+55,13
@@
class PharCompress implements Task
* @return string
*/
public function run($verbose = false) {
* @return string
*/
public function run($verbose = false) {
- if ($verbose) {
+ if ($verbose
!== false
) {
printf("Compressing %s ...\n", basename($this->package->getPath()));
}
printf("Compressing %s ...\n", basename($this->package->getPath()));
}
+ /* stop shebang */
+ $stub = $this->package->getStub();
$phar = $this->package->compress($this->encoding);
$phar = $this->package->compress($this->encoding);
- $meta = $phar->getMetadata();
- if (isset($meta["stub"])) {
- /* drop shebang */
- $phar->setDefaultStub($meta["stub"]);
- }
+ $phar->setStub(substr($stub, strpos($stub, "\n")+1));
return $this->file . $this->extension;
}
}
return $this->file . $this->extension;
}
}