Skip to content

Commit 92db2c8

Browse files
committed
Write TTY phpinfo output to system temp dir instead of cwd
1 parent ab074e5 commit 92db2c8

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

build/go.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ class="px-4 py-1 rounded block"
324324
exit;
325325
}
326326

327-
$file = getcwd() . DIRECTORY_SEPARATOR . 'phpinfo.html';
327+
$file = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'phpinfo.html';
328328
file_put_contents($file, $html);
329329

330330
$opened = match (PHP_OS_FAMILY) {
@@ -335,6 +335,6 @@ class="px-4 py-1 rounded block"
335335
};
336336

337337
fwrite(STDERR, $opened
338-
? "Saved to phpinfo.html and opened in your browser.\n"
339-
: "Saved to phpinfo.html\n"
338+
? "Opened in your browser.\n"
339+
: "Saved to $file\n"
340340
);

0 commit comments

Comments
 (0)