Allow l4t versions with three numbers as well as two

Closes: #1210
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
This commit is contained in:
Cameron Diver 2020-03-06 10:27:43 +00:00
parent 255c46c92e
commit 7d47661928

View File

@ -59,7 +59,7 @@ export function getOSSemver(path: string): Promise<string | undefined> {
return getOSReleaseField(path, 'VERSION');
}
const L4T_REGEX = /^.*-l4t-r(\d+\.\d+).*$/;
const L4T_REGEX = /^.*-l4t-r(\d+\.\d+(\.?\d+)?).*$/;
export async function getL4tVersion(): Promise<string | undefined> {
// We call `uname -r` on the host, and look for l4t
try {