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 1f63895 commit de4d30c
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 @@
# 7.1.4 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 znuny.CheckModules.pl/otrs.CheckModules.pl as mandatory.
- 2024-10-21 Sector Nord AG: Fixed #571 AgentTicketProcess Mobile-View is not showing all elements of ActivityDialog. Thanks to @LuBroering (Lukas Bröring SectorNord AG). [PR#553](https://github.com/znuny/Znuny/pull/553)
- 2024-10-16 AdminSystemConfiguration: Addon name is no longer translated.
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 de4d30c

Please sign in to comment.