From c7a01621b678720c9cfbe5cca38f6a700374fbaa Mon Sep 17 00:00:00 2001 From: Sam Vervaeck Date: Tue, 9 Jun 2020 10:35:50 +0200 Subject: [PATCH] bolt-test.ts: Make a few names more descriptive --- src/bin/bolt-test.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/bin/bolt-test.ts b/src/bin/bolt-test.ts index 76f70da1c..df965f4a7 100644 --- a/src/bin/bolt-test.ts +++ b/src/bin/bolt-test.ts @@ -288,17 +288,17 @@ function* loadTests(filepath: string): IterableIterator { } -function findSnapshot(name: string): string | null { +function findSnapshot(ref: string): string | null { // If `name` directly refers to a snapshot, we don't have any more work to do. - if (fs.existsSync(path.join(STORAGE_DIR, 'snapshots', name))) { - return name; + if (fs.existsSync(path.join(STORAGE_DIR, 'snapshots', ref))) { + return ref; } // Try to read an alias, returning early if it was indeed found - const ref = tryReadFileSync(path.join(STORAGE_DIR, 'aliases', name)); - if (ref !== null) { - return ref; + const snapshotKey = tryReadFileSync(path.join(STORAGE_DIR, 'aliases', ref)); + if (snapshotKey !== null) { + return snapshotKey; } // We don't support any more refs at the moment, so we indicate failure