Skip to content

Commit

Permalink
fix: throw a helpful error if http argument is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
billiegoose committed Mar 17, 2020
1 parent 0f4f03c commit 798fe1c
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/api/clone.js
Expand Up @@ -72,6 +72,7 @@ export async function clone({
}) {
try {
assertParameter('fs', fs)
assertParameter('http', http)
assertParameter('gitdir', gitdir)
if (!noCheckout) {
assertParameter('dir', dir)
Expand Down
1 change: 1 addition & 0 deletions src/api/fastForward.js
Expand Up @@ -60,6 +60,7 @@ export async function fastForward({
}) {
try {
assertParameter('fs', fs)
assertParameter('http', http)
assertParameter('gitdir', gitdir)

const thisWillNotBeUsed = {
Expand Down
1 change: 1 addition & 0 deletions src/api/fetch.js
Expand Up @@ -90,6 +90,7 @@ export async function fetch({
}) {
try {
assertParameter('fs', fs)
assertParameter('http', http)
assertParameter('gitdir', gitdir)

return await _fetch({
Expand Down
1 change: 1 addition & 0 deletions src/api/getRemoteInfo.js
Expand Up @@ -54,6 +54,7 @@ export async function getRemoteInfo({
forPush = false,
}) {
try {
assertParameter('http', http)
assertParameter('url', url)

const remote = await GitRemoteHTTP.discover({
Expand Down
1 change: 1 addition & 0 deletions src/api/push.js
Expand Up @@ -73,6 +73,7 @@ export async function push({
}) {
try {
assertParameter('fs', fs)
assertParameter('http', http)
assertParameter('gitdir', gitdir)

return await _push({
Expand Down

0 comments on commit 798fe1c

Please sign in to comment.