@@ -34,27 +34,27 @@ public function __invoke(Configuration $config): void
3434 {
3535 Task::info ('Assembly target %s ' , [$ this ->target ->output ]);
3636
37- $ targetStream = @\fopen ($ this ->targetPathname , 'wb+ ' );
37+ $ stream = @\fopen ($ this ->targetPathname , 'wb+ ' );
3838
3939 Task::notify ('Created output file %s ' , [
4040 $ this ->targetPathname ,
4141 ]);
4242
43- if ($ targetStream === false ) {
43+ if ($ stream === false ) {
4444 throw new \RuntimeException (\sprintf (
4545 'Unable to create target binary "%s" ' ,
4646 $ this ->targetPathname ,
4747 ));
4848 }
4949
50- \flock ($ targetStream , \LOCK_EX );
50+ \flock ($ stream , \LOCK_EX );
5151
52- $ this ->appendSfxArchive ($ targetStream , $ config );
53- $ this ->appendPhpConfig ($ targetStream , $ config );
54- $ this ->appendSource ($ targetStream , $ config );
52+ $ this ->appendSfxArchive ($ stream , $ config );
53+ $ this ->appendPhpConfig ($ stream , $ config );
54+ $ this ->appendSource ($ stream , $ config );
5555
56- \flock ($ targetStream , \LOCK_UN );
57- \fclose ($ targetStream );
56+ \flock ($ stream , \LOCK_UN );
57+ \fclose ($ stream );
5858 }
5959
6060 /**
@@ -99,6 +99,8 @@ private function appendPhpConfig(mixed $stream, Configuration $config): string
9999 target: $ this ->target ,
100100 ));
101101
102+ $ ini = \trim ($ ini );
103+
102104 \fwrite ($ stream , "\xfd\xf6\x69\xe6" );
103105 \fwrite ($ stream , \pack ('N ' , \strlen ($ ini )));
104106 \fwrite ($ stream , $ ini );
@@ -132,8 +134,6 @@ private function appendSfxArchive(mixed $stream, Configuration $config): void
132134 \stream_copy_to_stream ($ archiveStream , $ stream );
133135 \fclose ($ archiveStream );
134136
135- Task::notify (' prefix has been written ' , [
136- Path::simplify ($ config , $ this ->sfxPathname ),
137- ]);
137+ Task::notify ('Prefix has been written ' );
138138 }
139139}
0 commit comments