Skip to content

Commit 72fd0b3

Browse files
committed
tweaks
1 parent 4c72455 commit 72fd0b3

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

src/utils.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,16 @@ const LOCK_FILES: Array<{ filename: string; type: LockFileType }> = [
5656
];
5757

5858
/**
59-
* Detect a lock file in the provided search directory.
60-
* Defaults to searching in the workspace root.
59+
* Detect a lock file in the provided workspace directory.
60+
* Defaults to the GitHub workspace root.
6161
*/
6262
export function detectLockFile(
6363
explicitPath?: string,
64-
searchDir = getWorkspaceDir(),
64+
workspace = getWorkspaceDir(),
6565
): LockFileInfo | undefined {
66-
const workspace = searchDir;
67-
6866
// If explicit path provided, use it
6967
if (explicitPath) {
70-
const fullPath = resolvePath(explicitPath, searchDir);
68+
const fullPath = resolvePath(explicitPath, workspace);
7169

7270
if (existsSync(fullPath)) {
7371
const filename = basename(fullPath);
@@ -85,7 +83,7 @@ export function detectLockFile(
8583
return undefined;
8684
}
8785

88-
// Auto-detect: search for lock files in workspace root
86+
// Auto-detect: search for lock files in the provided workspace directory
8987
const workspaceContents = readdirSync(workspace);
9088

9189
for (const lockInfo of LOCK_FILES) {

0 commit comments

Comments
 (0)