Skip to content
This repository has been archived by the owner on Jul 27, 2022. It is now read-only.

Commit

Permalink
Fixed #41
Browse files Browse the repository at this point in the history
  • Loading branch information
overtrue committed Jan 22, 2019
1 parent 9855b89 commit 5550074
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Commands/Publish.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ public function handle()

if ('all' == $locale) {
$files = [
$sourcePath.'/*',
$sourceJsonPath,
\addslashes($sourcePath).'/*',
escapeshellarg($sourceJsonPath),
];
$message = 'all';
$copyEnFiles = true;
Expand All @@ -83,14 +83,14 @@ public function handle()
}

$published[] = $filename;
$files[] = $file;
$files[] = escapeshellarg($file);

if (!file_exists($jsonFile)) {
$this->error("lang '$filename' not found.");

continue;
}
$files[] = $jsonFile;
$files[] = escapeshellarg($jsonFile);
}

if (empty($files)) {
Expand All @@ -101,10 +101,10 @@ public function handle()
}

if ($inLumen && $copyEnFiles) {
$files[] = base_path('vendor/laravel/lumen-framework/resources/lang/en');
$files[] = escapeshellarg(base_path('vendor/laravel/lumen-framework/resources/lang/en'));
}

$files = implode(' ', \array_map('escapeshellarg', $files));
$files = implode(' ', $files);
$targetPath = escapeshellarg($targetPath);
$command = "cp -r{$force} {$files} {$targetPath}";
$process = \method_exists(Process::class, 'fromShellCommandline') ? Process::fromShellCommandline($command) : new Process($command);
Expand Down

0 comments on commit 5550074

Please sign in to comment.