Don't retrieve info object twice

Summary: Some unnecessary syscalls in the way we actually use this at the moment.

Reviewed By: danielbuechele

Differential Revision: D14750875

fbshipit-source-id: 5959ed0845398b29698ab58f7359869fa3657fdc
This commit is contained in:
Pascal Hartig
2019-04-04 09:50:43 -07:00
committed by Facebook Github Bot
parent 2655d9b0ef
commit 684ecd8a39

View File

@@ -32,9 +32,7 @@ export function getInfo(): Info {
}; };
} }
export function stringifyInfo(): string { export function stringifyInfo(info: Info): string {
const info = getInfo();
const lines = [ const lines = [
`Platform: ${info.platform} ${info.arch}`, `Platform: ${info.platform} ${info.arch}`,
`Unixname: ${info.unixname}`, `Unixname: ${info.unixname}`,