linux-os-release
Version:
Reads Linux operating system identification data
17 lines (16 loc) • 640 B
TypeScript
/**
* Parse os-release text content according to the specification
* Handles proper shell quoting, escaping, and variable name validation
* @param text - The content of the os-release file
* @returns Parsed key-value pairs
*/
export declare function parseOsReleaseText(text: string): Record<string, string>;
/**
* Reads /etc/os-release to get the Linux distro info.
* https://www.freedesktop.org/software/systemd/man/latest/os-release.html
*
* Example files:
* https://github.com/stejskalleos/os_release
*/
export declare function readLinuxOSReleaseInfo(): Promise<Record<string, string>>;
export default readLinuxOSReleaseInfo;