Skip to content

Commit 3d4f506

Browse files
committed
fix: adapt to latest master
1 parent a221f93 commit 3d4f506

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

@commitlint/read/src/get-edit-commit.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
import toplevel from '@commitlint/top-level';
2+
import {getEditFilePath} from './get-edit-file-path';
3+
4+
const sander = require('@marionebl/sander');
25

36
// Get recently edited commit message
47
export async function getEditCommit(

@commitlint/top-level/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default toplevel;
1313
/**
1414
* Find the next git root
1515
*/
16-
async function toplevel(cwd: string) {
16+
async function toplevel(cwd?: string) {
1717
const found = await searchDotGit(cwd);
1818

1919
if (typeof found !== 'string') {
@@ -26,7 +26,7 @@ async function toplevel(cwd: string) {
2626
/**
2727
* Search .git, the '.git' can be a file(submodule), also can be a directory(normal)
2828
*/
29-
async function searchDotGit(cwd: string) {
29+
async function searchDotGit(cwd?: string) {
3030
const foundFile = await up('.git', {cwd, type: 'file'});
3131
const foundDir = await up('.git', {cwd, type: 'directory'});
3232

0 commit comments

Comments
 (0)