diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2018-09-10 10:23:55 +0300 |
---|---|---|
committer | Stefan Giehl <stefan@piwik.org> | 2018-09-10 10:23:55 +0300 |
commit | 72809a946e181cdf939b770ebb129e62f8dfe039 (patch) | |
tree | 63175e871c81975c070b3aaaa1ae5d55848532a3 /plugins/CoreConsole | |
parent | f72637f3c10ee8e2fc5535c28dbf755dcd2a0457 (diff) |
Create directory for processed files if needed when syncing tests (#13403)
I got this message:
[Exception]
Error while creating/copying file to <code>plugins/Annotations/tests/System/processed/test_annotations__Annotations.get.xml
</code>. <br />Please check that the web server has enough permission to write to these files/directories:<br />For example, on a GNU/Linux server if your Apache httpd user is
abc, you can try to execute:<br />
<code>chown -R abc ...www/piwik</code><br /><code>chmod -R 0755 ...www/piw
ik</code><br />
Diffstat (limited to 'plugins/CoreConsole')
-rw-r--r-- | plugins/CoreConsole/Commands/DevelopmentSyncProcessedSystemTests.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/CoreConsole/Commands/DevelopmentSyncProcessedSystemTests.php b/plugins/CoreConsole/Commands/DevelopmentSyncProcessedSystemTests.php index d581fd8127..b5b7d9d657 100644 --- a/plugins/CoreConsole/Commands/DevelopmentSyncProcessedSystemTests.php +++ b/plugins/CoreConsole/Commands/DevelopmentSyncProcessedSystemTests.php @@ -107,7 +107,9 @@ class DevelopmentSyncProcessedSystemTests extends ConsoleCommand foreach($artifacts as $artifact) { $artifactName = basename($artifact); list($plugin, $file) = explode('~~', $artifactName); - Filesystem::copy($artifact, sprintf($targetDir, $plugin) . $file); + $pluginTargetDir = sprintf($targetDir, $plugin); + Filesystem::mkdir($pluginTargetDir); + Filesystem::copy($artifact, $pluginTargetDir . $file); } Filesystem::unlinkRecursive($extractionTarget, true); |