Finally fixed project directory for Build::writeSshKey and

Build::writeSshWrapper (Now files in system temp directory).
Issue #165.
This commit is contained in:
Dmitry Khomutov 2018-03-16 20:46:46 +07:00
commit 55bebf05dc
No known key found for this signature in database
GPG key ID: EC19426474B37AAC
3 changed files with 10 additions and 14 deletions

View file

@ -99,7 +99,7 @@ class PhpCpd extends Plugin implements ZeroConfigPluginInterface
$phpcpd = $this->findBinary('phpcpd');
$tmpFileName = tempnam('/tmp', 'phpcpd');
$tmpFileName = tempnam(sys_get_temp_dir(), 'phpcpd_');
$cmd = $phpcpd . ' --log-pmd "%s" %s "%s"';
$success = $this->builder->executeCommand($cmd, $tmpFileName, $ignore, $this->path);

View file

@ -161,7 +161,7 @@ class PhpUnit extends Plugin implements ZeroConfigPluginInterface
$buildPath = $this->build->getBuildPath();
// Save the results into a log file
$logFile = @tempnam($buildPath, 'jLog_');
$logFile = tempnam(sys_get_temp_dir(), 'jlog_');
$options->addArgument('log-' . $logFormat, $logFile);
// Removes any current configurations files
@ -258,7 +258,7 @@ class PhpUnit extends Plugin implements ZeroConfigPluginInterface
$this->builder, 'php_unit', $error['message'], $severity, $error['file'], $error['line']
);
}
@unlink($logFile);
unlink($logFile);
} else {
throw new \Exception('log output file does not exist: ' . $logFile);
}