File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -6,8 +6,12 @@ export const isURI = (path) => !!path.match(/\w+:(\/?\/?)[^\s]+/)
66
77export const loadFile = ( context , filePath ) => {
88 const { filesystem } = context
9- if ( filesystem . exists ( filePath ) ) {
10- return JSON5 . parse ( filesystem . read ( '.solidarity' ) )
9+ if ( filesystem . exists ( filePath + path . sep + '.solidarity' ) ) {
10+ return JSON5 . parse ( filesystem . read ( filePath + path . sep + '.solidarity' ) )
11+ } else if ( filesystem . exists ( filePath + path . sep + '.solidarity.json' ) ) {
12+ return JSON5 . parse ( filesystem . read ( filePath + path . sep + '.solidarity.json' ) )
13+ } else if ( filesystem . exists ( filePath ) === 'file' ) {
14+ return JSON5 . parse ( filesystem . read ( filePath ) )
1115 } else {
1216 throw 'ERROR: There is no solidarity file at the given path'
1317 }
You can’t perform that action at this time.
0 commit comments