File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Expand file tree Collapse file tree 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) {
3939 }
4040
4141 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+ )
4345 }
4446 } else {
4547 repo = givenRepo
Original file line number Diff line number Diff line change @@ -501,7 +501,7 @@ test('remark-validate-links', async function (t) {
501501 assert . fail ( )
502502 } catch ( error ) {
503503 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)
505505 } finally {
506506 await fs . rename ( gitBakUrl , gitUrl )
507507 }
@@ -525,7 +525,10 @@ test('remark-validate-links', async function (t) {
525525 } catch ( error ) {
526526 const cause = /** @type {ExecError } */ ( error )
527527 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+ )
529532 }
530533 } )
531534
You can’t perform that action at this time.
0 commit comments