From 35c1974014e9b9f11378525b0781115413388310 Mon Sep 17 00:00:00 2001 From: cyhhao Date: Fri, 16 Dec 2022 00:55:19 +0800 Subject: [PATCH] fix --- README.md | 5 +++-- src/index.ts | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a418633..3202af9 100644 --- a/README.md +++ b/README.md @@ -16,11 +16,12 @@ yarn pkg yarn install-mac ``` -# git3 URI protocol +# git3 uri protocol ``` git3://[sender_wallet]@[contract_address or NS]:[chain_id]/ ``` - [sender_wallet] Optional, the default value is `default` - [contract_address or NS] Optional, the default value is `git3.w3q` -- [chain_id] Optional, the default value is 3334 +- [chain_id] Optional, the default value is `3334` +- Required, your repo name diff --git a/src/index.ts b/src/index.ts index 6352c57..219ca2d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -25,7 +25,7 @@ GitRemoteHelper({ } else { // use Default git3Address git3Address = null - repoName = url.hostname + repoName = url.hostname.startsWith("/") ? url.hostname.slice(1) : url.hostname } } else {