File tree 2 files changed +8
-3
lines changed
2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,9 @@ export async function findRepo(file, options) {
39
39
}
40
40
41
41
if ( ! repo ) {
42
- throw new Error ( 'Could not find remote origin' )
42
+ throw new Error (
43
+ 'Cannot find remote `origin` of local Git repo; pass `repository: false` if you are not using Git'
44
+ )
43
45
}
44
46
} else {
45
47
repo = givenRepo
Original file line number Diff line number Diff line change @@ -501,7 +501,7 @@ test('remark-validate-links', async function (t) {
501
501
assert . fail ( )
502
502
} catch ( error ) {
503
503
const cause = /** @type {ExecError } */ ( error )
504
- assert . ok ( / n o t a g i t r e p o s i t o r y / i. test ( String ( cause ) ) )
504
+ assert . match ( String ( cause ) , / n o t a g i t r e p o s i t o r y / i)
505
505
} finally {
506
506
await fs . rename ( gitBakUrl , gitUrl )
507
507
}
@@ -525,7 +525,10 @@ test('remark-validate-links', async function (t) {
525
525
} catch ( error ) {
526
526
const cause = /** @type {ExecError } */ ( error )
527
527
await fs . rm ( './.git' , { recursive : true } )
528
- assert . ok ( / C o u l d n o t f i n d r e m o t e o r i g i n / . test ( String ( cause ) ) )
528
+ assert . match (
529
+ String ( cause ) ,
530
+ / C a n n o t f i n d r e m o t e ` o r i g i n ` o f l o c a l G i t r e p o /
531
+ )
529
532
}
530
533
} )
531
534
You can’t perform that action at this time.
0 commit comments