Skip to content

Commit

Permalink
Fix minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sudhirverma committed Mar 31, 2021
1 parent d9d6b65 commit 7b40cc8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/commands/delete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { ClusterTriggerBinding } from '../tekton/clustertriggerbunding';
import { telemetryLogCommand, telemetryLogError } from '../telemetry';
import { ContextType } from '../context-type';
import { TektonNode } from '../tree-view/tekton-node';
import { checkRefResource, getPipelineResourceList, referenceOfTaskAndClusterTaskInCluster } from '../util/check-ref-resource';
import { checkRefResource, getPipelineList, referenceOfTaskAndClusterTaskInCluster } from '../util/check-ref-resource';

interface Refreshable {
refresh(): void;
Expand Down Expand Up @@ -62,8 +62,8 @@ async function doDelete(items: TektonNode[], toRefresh: Refreshable, commandId?:
toDelete.set(item, deleteCommand);
}
if (refResource && checkRefResource()) {
const taskRunList = await getPipelineResourceList();
if (referenceOfTaskAndClusterTaskInCluster(item, taskRunList)) {
const pipelineList = await getPipelineList();
if (referenceOfTaskAndClusterTaskInCluster(item, pipelineList)) {
refResource = false;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/util/check-ref-resource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const tektonResource = {
}


export async function getPipelineResourceList(): Promise<Pipeline[]> {
export async function getPipelineList(): Promise<Pipeline[]> {
const result = await cli.execute(Command.listPipeline());
if (result.error) {
// ignore
Expand Down

0 comments on commit 7b40cc8

Please sign in to comment.