Skip to content

Commit 5e81412

Browse files
authored
fix dir permissions (#11)
1 parent 74385fb commit 5e81412

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Command/ConvertAvscToJsonCommand.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function execute(InputInterface $input, OutputInterface $output): ?int
7979
$json = $this->converter->convert($avsc, ['markNoDefaultAsRequired' => $noDefaultAsRequired]);
8080

8181
if (false === file_exists($outputDirectory)) {
82-
mkdir($outputDirectory);
82+
mkdir($outputDirectory, 0755, true);
8383
}
8484

8585
$fname = $outputDirectory . DIRECTORY_SEPARATOR . str_replace('.avsc', '.json', $file->getFilename());

src/Command/ConvertSingleAvscToJsonCommand.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ public function execute(InputInterface $input, OutputInterface $output): ?int
5959
$json = $this->converter->convert($avsc, ['markNoDefaultAsRequired' => $noDefaultAsRequired]);
6060

6161
if (false === file_exists($outputDirectory)) {
62-
mkdir($outputDirectory);
62+
mkdir($outputDirectory, 0755, true);
6363
}
6464

65-
$fname = $outputDirectory . DIRECTORY_SEPARATOR . $jsonSchema;
65+
$fname = $jsonSchema;
6666
file_put_contents($fname, $json);
6767

6868
$output->writeln('Successfully converted avsc schema');

0 commit comments

Comments
 (0)