Skip to content

Commit

Permalink
Fixed Bug - 'Use of uninitialized value' warning on build custom pack…
Browse files Browse the repository at this point in the history
…age and there are no permissions to write to the target directory. Thanks to @BuilderNSV for reporting the issue. #610
  • Loading branch information
dennykorsukewitz committed Oct 25, 2024
1 parent e94fc3f commit 30dc736
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# 6.5.12 2024-??-??
- 2024-10-24 Fixed Bug - 'Use of uninitialized value' warning on build custom package and there are no permissions to write to the target directory. Thanks to @BuilderNSV for reporting the issue. [#610](https://github.com/znuny/Znuny/issues/610)
- 2024-10-22 Perl Module Hash::Merge is now be listed in otrs.CheckModules.pl as mandatory.
- 2024-10-15 Ticket search for customer ID in customer interface now searches for the raw ID. Thanks to @BuilderNSV for reporting the issue. [#602](https://github.com/znuny/Znuny/issues/602)
- 2024-10-10 Updated MIME::Decoder::QuotedPrint from 5.509 to 5.515.
Expand Down
18 changes: 6 additions & 12 deletions Kernel/System/Console/Command/Dev/Package/Build.pm
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ package Kernel::System::Console::Command::Dev::Package::Build;

use strict;
use warnings;
use utf8;

use parent qw(Kernel::System::Console::BaseCommand);

Expand Down Expand Up @@ -125,25 +126,18 @@ sub Run {
my $File = $Kernel::OM->Get('Kernel::System::Main')->FileWrite(
Location => $Self->GetArgument('target-directory') . '/' . $Filename,
Content => \$Content,
Mode => 'utf8', # binmode|utf8
Type => 'Local', # optional - Local|Attachment|MD5
Permission => '644', # unix file permissions
Mode => 'utf8',
Type => 'Local',
Permission => '644',
);

if ( !$File ) {
$Self->PrintError("File $File could not be written.\n");
$Self->PrintError("File $Filename could not be written.\n");
return $Self->ExitCodeError();
}

$Self->Print("<green>Done.</green>\n");
return $Self->ExitCodeOk();
}

# sub PostRun {
# my ( $Self, %Param ) = @_;
#
# # This will be called after Run() (even in case of exceptions). Perform any cleanups here.
#
# return;
# }

1;

0 comments on commit 30dc736

Please sign in to comment.