Skip to content

Commit 1675910

Browse files
committed
Colors in logs
1 parent 9c83561 commit 1675910

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

packager/package.php.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: jppm
2-
version: 0.5.5
2+
version: 0.5.6
33

44
plugins: [GitHub, Hub, Doc]
55

packager/src-php/packager/Colors.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ class Colors{
3333

3434
public static function withColor($str, $color)
3535
{
36+
37+
if(Package::getOS()=='win'){
38+
return $str;
39+
}
3640
$color_attrs = explode("+", $color);
3741
$ansi_str = "";
3842

packager/src-php/packager/Repository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ public function findPackage(string $name, string $versionPattern, ?PackageLock $
396396
if ($foundVersionSource instanceof ExternalRepository) {
397397
$foundVersionInfo = $this->getVersionInfoFromExternal($foundVersionSource, $name, $foundVersion);
398398

399-
Console::log("-> download package {0}@{1} from '{$foundVersionSource->getSource()}'", $name, $foundVersion);
399+
Console::info("-> ".Colors::withColor('Download Package', 'green')." {0}@{1} from '{$foundVersionSource->getSource()}'", $name, $foundVersion);
400400

401401
$indexFile = "$this->dir/$name/$foundVersion.json";
402402
$archFile = "$this->dir/$name/$foundVersion.tar.gz";

0 commit comments

Comments
 (0)