Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit 7419c7e

Browse files
committed
fix: Describe when and why to use init: false
Add some description to the "advanced options" documentation for the `IPFS` constructor detailing that `init: false` should really be used if a repo has already been initialized *by IPFS* and that simply calling `repoInstance.init()` doesn't init a repo with everything IPFS needs. This partially handles #1245. License: MIT Signed-off-by: Rob Brackett <[email protected]>
1 parent a32dce7 commit 7419c7e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,11 @@ const repo = <IPFS Repo instance or repo path>
194194
const node = new IPFS({
195195
repo: repo,
196196
init: true, // default
197-
// init: false,
197+
// init: false, // If you have already initialized the repo via `new IPFS()`.
198+
// // Be careful using this on an IPFSRepo instance you have
199+
// // initialized yourself -- the IPFS constructor initializes
200+
// // repos with extra options, so calling `init()` on an
201+
// // IPFSRepo may not always be compatible with IPFS.
198202
// init: {
199203
// bits: 1024 // size of the RSA key generated
200204
// },

0 commit comments

Comments
 (0)