Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Anatolii Bazko <[email protected]>
  • Loading branch information
tolusha committed Dec 14, 2022
1 parent 8ff63fe commit 6c6a52e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api/che-logs-reader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@

import { V1Pod, Watch } from '@kubernetes/client-node'
import * as cp from 'child_process'
import * as commandExists from 'command-exists'
import * as fs from 'fs-extra'
import * as path from 'path'
import { KubeClient } from './kube-client'
import {isCommandExists} from '../utils/utls'

export class CheLogsReader {
private kubeHelper: KubeClient
Expand Down Expand Up @@ -61,7 +61,7 @@ export class CheLogsReader {
const fileName = path.resolve(directory, namespace, 'events.txt')
fs.ensureFileSync(fileName)

const cli = (await commandExists('kubectl') && 'kubectl') || (await commandExists('oc') && 'oc')
const cli = (await isCommandExists('kubectl') && 'kubectl') || (await isCommandExists('oc') && 'oc')
if (cli) {
const command = 'get events'
const namespaceParam = `-n ${namespace}`
Expand Down

0 comments on commit 6c6a52e

Please sign in to comment.