docker: isAvailable use get

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2023-02-01 16:49:46 +01:00
parent c89aa60986
commit 765b23685c
3 changed files with 5 additions and 5 deletions

View File

@@ -23,7 +23,7 @@ export class Docker {
return process.env.DOCKER_CONFIG || path.join(os.homedir(), '.docker');
}
public static isAvailable(): boolean {
static get isAvailable(): boolean {
let dockerAvailable = false;
exec
.getExecOutput('docker', undefined, {
@@ -45,7 +45,7 @@ export class Docker {
}
public static async printVersion(standalone?: boolean) {
const noDocker = standalone ?? !Docker.isAvailable();
const noDocker = standalone ?? !Docker.isAvailable;
if (noDocker) {
return;
}
@@ -55,7 +55,7 @@ export class Docker {
}
public static async printInfo(standalone?: boolean) {
const noDocker = standalone ?? !Docker.isAvailable();
const noDocker = standalone ?? !Docker.isAvailable;
if (noDocker) {
return;
}