This repository was archived by the owner on Feb 12, 2024. It is now read-only.
File tree 3 files changed +12140
-3
lines changed 3 files changed +12140
-3
lines changed Original file line number Diff line number Diff line change 61
61
},
62
62
"homepage" : " https://github.com/ipfs/js-ipfs#readme" ,
63
63
"devDependencies" : {
64
- "aegir" : " ^13.1.0 " ,
64
+ "aegir" : " github:ipfs/aegir#upgrade-deps " ,
65
65
"buffer-loader" : " 0.0.1" ,
66
66
"chai" : " ^4.1.2" ,
67
67
"delay" : " ^2.0.0" ,
73
73
"expose-loader" : " ^0.7.5" ,
74
74
"form-data" : " ^2.3.2" ,
75
75
"hat" : " 0.0.3" ,
76
- "interface-ipfs-core" : " ~0.65.7 " ,
76
+ "interface-ipfs-core" : " ~0.66.0 " ,
77
77
"ipfsd-ctl" : " github:ipfs/js-ipfsd-ctl#fix/node10" ,
78
78
"lodash" : " ^4.17.10" ,
79
79
"mocha" : " ^5.1.1" ,
Original file line number Diff line number Diff line change 3
3
const waterfall = require ( 'async/waterfall' )
4
4
const series = require ( 'async/series' )
5
5
const extend = require ( 'deep-extend' )
6
+ const RepoErrors = require ( 'ipfs-repo/src/errors' )
6
7
7
8
// Boot an IPFS node depending on the options set
8
9
module . exports = ( self ) => {
@@ -40,7 +41,14 @@ module.exports = (self) => {
40
41
// which happens when the version file is not found
41
42
// we just want to signal that no repo exist, not
42
43
// fail the whole process.
43
- // TODO: improve datastore and ipfs-repo implemenations so this error is a bit more unified
44
+
45
+ // Use standardized errors as much as possible
46
+ if ( err . code === RepoErrors . ERR_REPO_NOT_INITIALIZED ) {
47
+ return cb ( null , false )
48
+ }
49
+
50
+ // TODO: As error codes continue to be standardized, this logic can be phase out;
51
+ // it is here to maintain compatability
44
52
if ( err . message . match ( / n o t f o u n d / ) || // indexeddb
45
53
err . message . match ( / E N O E N T / ) || // fs
46
54
err . message . match ( / N o v a l u e / ) // memory
You can’t perform that action at this time.
0 commit comments