Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fixes prompt for `null` password #159

Closed
wants to merge 1 commit into from

1 participant

@alexgorbatchev

If you don't have auth info in couch path, copy.sh ends up prompting to enter password for null. This fixes the issue.

@isaacs isaacs closed this pull request from a commit
@isaacs isaacs Don't send 'null' as auth
Fix #159
e4512dd
@isaacs isaacs closed this in e4512dd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 10 additions and 4 deletions.
  1. +10 −4 copy.sh
View
14 copy.sh
@@ -42,7 +42,13 @@ fi
auth="$(node -pe 'require("url").parse(process.argv[1]).auth' "$c")"
url="$(node -pe 'u=require("url");p=u.parse(process.argv[1]);delete p.auth;u.format(p)' "$c")"
-curl "$url/_design/scratch" \
- -k -u "$auth" \
- -X COPY \
- -H destination:'_design/app'$rev
+if [[ $auth != null ]]; then
+ curl "$url/_design/scratch" \
+ -k -u "$auth" \
+ -X COPY \
+ -H destination:'_design/app'$rev
+else
+ curl "$url/_design/scratch" \
+ -X COPY \
+ -H destination:'_design/app'$rev
+fi
Something went wrong with that request. Please try again.