Skip to content

Commit

Permalink
Check repository
Browse files Browse the repository at this point in the history
  • Loading branch information
Takeshi committed Feb 17, 2024
1 parent a567afa commit c97ea1c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/utils/clone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,17 @@ export default async function clone(

const depth = options?.git?.depth || 1

if (repository.includes('--upload-pack') || directory.includes('--upload-pack')) {
throw new GitlyCloneError('Invalid argument')

Check warning on line 49 in src/utils/clone.ts

View check run for this annotation

Codecov / codecov/patch

src/utils/clone.ts#L49

Added line #L49 was not covered by tests
}

/* istanbul ignore if */
if (typeof depth !== 'number') {
throw new GitlyCloneError('Invalid depth option')
}

/* istanbul ignore if */
if (info.href.includes('--upload-pack') || directory.includes('--upload-pack')) {
if (info.href.includes('--upload-pack')) {
throw new GitlyCloneError('Invalid argument')
}

Expand Down

0 comments on commit c97ea1c

Please sign in to comment.