Determine zstd availability earlier on to simplify log
This commit is contained in:
parent
db98c27941
commit
a7a6a6951e
17 changed files with 115 additions and 47 deletions
|
|
@ -46,9 +46,14 @@ async function getTarVersion(): Promise<TarVersion> {
|
|||
}
|
||||
}
|
||||
|
||||
export interface ZstdAvailability {
|
||||
available: boolean;
|
||||
version?: TarVersion;
|
||||
}
|
||||
|
||||
export async function isZstdAvailable(
|
||||
logger: Logger,
|
||||
): Promise<{ available: boolean; version?: TarVersion }> {
|
||||
): Promise<ZstdAvailability> {
|
||||
try {
|
||||
const tarVersion = await getTarVersion();
|
||||
const { type, version } = tarVersion;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue