Skip to content

Commit 4616180

Browse files
committed
Emulate is_musl_based_distro
1 parent 96c684a commit 4616180

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/platform.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,12 +177,13 @@ export class PlatformInformation {
177177
return architecture;
178178
}
179179

180+
// Emulates https://github.com/dotnet/install-scripts/blob/3c6cc06/src/dotnet-install.sh#L187-L189.
180181
private static async GetIsMusl(): Promise<boolean> {
181182
try {
182183
const output = await util.execChildProcess('ldd --version');
183184
return output.includes('musl');
184185
} catch (err) {
185-
return false;
186+
return err instanceof Error ? err.message.includes('musl') : false;
186187
}
187188
}
188189

0 commit comments

Comments
 (0)