Skip to content

Commit

Permalink
fix dir permissions (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-zh authored Nov 21, 2021
1 parent 74385fb commit 5e81412
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Command/ConvertAvscToJsonCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public function execute(InputInterface $input, OutputInterface $output): ?int
$json = $this->converter->convert($avsc, ['markNoDefaultAsRequired' => $noDefaultAsRequired]);

if (false === file_exists($outputDirectory)) {
mkdir($outputDirectory);
mkdir($outputDirectory, 0755, true);
}

$fname = $outputDirectory . DIRECTORY_SEPARATOR . str_replace('.avsc', '.json', $file->getFilename());
Expand Down
4 changes: 2 additions & 2 deletions src/Command/ConvertSingleAvscToJsonCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ public function execute(InputInterface $input, OutputInterface $output): ?int
$json = $this->converter->convert($avsc, ['markNoDefaultAsRequired' => $noDefaultAsRequired]);

if (false === file_exists($outputDirectory)) {
mkdir($outputDirectory);
mkdir($outputDirectory, 0755, true);
}

$fname = $outputDirectory . DIRECTORY_SEPARATOR . $jsonSchema;
$fname = $jsonSchema;
file_put_contents($fname, $json);

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

0 comments on commit 5e81412

Please sign in to comment.