Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: throw a helpful error if http argument is missing #1092

Merged
merged 1 commit into from Mar 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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