File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 1
1
import toplevel from '@commitlint/top-level' ;
2
+ import { getEditFilePath } from './get-edit-file-path' ;
3
+
4
+ const sander = require ( '@marionebl/sander' ) ;
2
5
3
6
// Get recently edited commit message
4
7
export async function getEditCommit (
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ export default toplevel;
13
13
/**
14
14
* Find the next git root
15
15
*/
16
- async function toplevel ( cwd : string ) {
16
+ async function toplevel ( cwd ? : string ) {
17
17
const found = await searchDotGit ( cwd ) ;
18
18
19
19
if ( typeof found !== 'string' ) {
@@ -26,7 +26,7 @@ async function toplevel(cwd: string) {
26
26
/**
27
27
* Search .git, the '.git' can be a file(submodule), also can be a directory(normal)
28
28
*/
29
- async function searchDotGit ( cwd : string ) {
29
+ async function searchDotGit ( cwd ? : string ) {
30
30
const foundFile = await up ( '.git' , { cwd, type : 'file' } ) ;
31
31
const foundDir = await up ( '.git' , { cwd, type : 'directory' } ) ;
32
32
You can’t perform that action at this time.
0 commit comments