No self dox unless necessary

Signed-off-by: dzdidi <deniszalessky@gmail.com>
This commit is contained in:
dzdidi
2024-02-05 17:26:32 +00:00
parent ab27116cc0
commit 03453f3ab4

View File

@@ -28,7 +28,11 @@ const targetKey = matches[1]
const repoName = matches[2] const repoName = matches[2]
const store = new Corestore(RAM) const store = new Corestore(RAM)
const swarm = new Hyperswarm({ keyPair: home.getKeyPair() }) const swarmOpts = {}
if (process.env.GIT_PEAR_AUTH && process.env.GIT_PEAR_AUTH !== 'native') {
swarmOpts.keyPair = home.getKeyPair()
}
const swarm = new Hyperswarm(swarmOpts)
if (!home.isDaemonRunning()) { if (!home.isDaemonRunning()) {
console.error('Please start git pear daemon') console.error('Please start git pear daemon')