Skip to content

Commit d84f470

Browse files
committed
Improve method naming
1 parent 41c0a26 commit d84f470

File tree

9 files changed

+37
-37
lines changed

9 files changed

+37
-37
lines changed

‎lib/analyze-action.js‎

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎lib/init-action-post.js‎

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎lib/init-action.js‎

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎lib/setup-codeql-action.js‎

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎lib/upload-lib.js‎

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎lib/upload-sarif-action.js‎

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/tar.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import * as semver from "semver";
99

1010
import { CommandInvocationError } from "./actions-util";
1111
import { Logger } from "./logging";
12-
import { assertNever, cleanUpGlob, isBinaryAccessible } from "./util";
12+
import { assertNever, cleanUpPath, isBinaryAccessible } from "./util";
1313

1414
const MIN_REQUIRED_BSD_TAR_VERSION = "3.4.3";
1515
const MIN_REQUIRED_GNU_TAR_VERSION = "1.31";
@@ -217,7 +217,7 @@ export async function extractTarZst(
217217
});
218218
});
219219
} catch (e) {
220-
await cleanUpGlob(dest, "extraction destination directory", logger);
220+
await cleanUpPath(dest, "extraction destination directory", logger);
221221
throw e;
222222
}
223223
}

‎src/tools-download.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import * as semver from "semver";
1212

1313
import { formatDuration, Logger } from "./logging";
1414
import * as tar from "./tar";
15-
import { cleanUpGlob, getErrorMessage, getRequiredEnvParam } from "./util";
15+
import { cleanUpPath, getErrorMessage, getRequiredEnvParam } from "./util";
1616

1717
/**
1818
* High watermark to use when streaming the download and extraction of the CodeQL tools.
@@ -130,7 +130,7 @@ export async function downloadAndExtract(
130130

131131
// If we failed during processing, we want to clean up the destination directory
132132
// before we try again.
133-
await cleanUpGlob(dest, "CodeQL bundle", logger);
133+
await cleanUpPath(dest, "CodeQL bundle", logger);
134134
}
135135

136136
const toolsDownloadStart = performance.now();
@@ -167,7 +167,7 @@ export async function downloadAndExtract(
167167
)}).`,
168168
);
169169
} finally {
170-
await cleanUpGlob(archivedBundlePath, "CodeQL bundle archive", logger);
170+
await cleanUpPath(archivedBundlePath, "CodeQL bundle archive", logger);
171171
}
172172

173173
return {

‎src/util.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,10 +1262,10 @@ export async function checkSipEnablement(
12621262
}
12631263
}
12641264

1265-
export async function cleanUpGlob(glob: string, name: string, logger: Logger) {
1265+
export async function cleanUpPath(file: string, name: string, logger: Logger) {
12661266
logger.debug(`Cleaning up ${name}.`);
12671267
try {
1268-
await fs.promises.rm(glob, {
1268+
await fs.promises.rm(file, {
12691269
force: true,
12701270
recursive: true,
12711271
});

0 commit comments

Comments
 (0)