On a windows system having a file path like '/tmp/' . md5(microtime(true)) caused problems. I've updated this to use the system temp directory.
This commit is contained in:
parent
9ea3a22864
commit
0a9c7bda93
|
@ -88,7 +88,11 @@ class ProjectController extends b8\Controller
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$id = '/tmp/' . md5(microtime(true));
|
$tempPath = sys_get_temp_dir() . '/tmp/';
|
||||||
|
$id = $tempPath . md5(microtime(true));
|
||||||
|
if (!is_dir($tempPath)) {
|
||||||
|
mkdir($tempPath);
|
||||||
|
}
|
||||||
shell_exec('ssh-keygen -q -t rsa -b 2048 -f '.$id.' -N "" -C "deploy@phpci"');
|
shell_exec('ssh-keygen -q -t rsa -b 2048 -f '.$id.' -N "" -C "deploy@phpci"');
|
||||||
|
|
||||||
$pub = file_get_contents($id . '.pub');
|
$pub = file_get_contents($id . '.pub');
|
||||||
|
|
Loading…
Reference in a new issue