File tree Expand file tree Collapse file tree 4 files changed +35
-5
lines changed Expand file tree Collapse file tree 4 files changed +35
-5
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
6
6
7
7
## [ Unreleased]
8
8
9
+ ## [ 0.2.1] - 2017-10-13
10
+ ### Fixed
11
+ - Replace the JS error message (non-handled error) on ` scripts ` and ` modules ` commands
12
+ by a user friendly error message.
13
+
9
14
## [ 0.2.0] - 2017-10-12
10
15
### Added
11
16
- This CHANGELOG file to hopefully serve to all developers and users.
@@ -31,6 +36,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
31
36
- The README file to give first information on the project (installation, usage, etc.).
32
37
33
38
[ Unreleased ] : https://github.com/Mindsers/configfile/tree/develop
39
+ [ 0.2.1 ] : https://github.com/Mindsers/configfile/tree/0.2.1
34
40
[ 0.2.0 ] : https://github.com/Mindsers/configfile/tree/0.2.0
35
41
[ 0.1.1 ] : https://github.com/Mindsers/configfile/tree/0.1.1
36
42
[ 0.1.0 ] : https://github.com/Mindsers/configfile/tree/0.1.0
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " configfile" ,
3
- "version" : " 0.2.0 " ,
4
- "description" : " Config files manager" ,
3
+ "version" : " 0.2.1 " ,
4
+ "description" : " Personal config files manager" ,
5
5
"main" : " index.js" ,
6
- "repository" : " github.com:Mindsers/configfiles .git" ,
6
+ "repository" : " github.com:Mindsers/configfile .git" ,
7
7
"author" :
" Mindsers <[email protected] >" ,
8
8
"license" : " Apache-2.0" ,
9
9
"bin" : {
Original file line number Diff line number Diff line change 1
1
const { LogUtils } = require ( './shared/log.utils' )
2
2
3
+ const { ConfigurationFileNotExist } = require ( './services/config' )
4
+
3
5
module . exports = exports = fileService => ( ) => {
4
- const modules = fileService . modules
6
+ let modules = [ ]
7
+
8
+ try {
9
+ modules = fileService . modules
10
+ } catch ( e ) {
11
+ if ( e instanceof ConfigurationFileNotExist ) {
12
+ LogUtils . log ( { message : 'Unable to load modules without knowing where are stored the data.' } )
13
+ LogUtils . log ( { type : 'error' , message : 'No configuration file. You need to run the init command before.' } )
14
+ return
15
+ }
16
+ }
5
17
6
18
if ( modules . length < 1 ) {
7
19
LogUtils . log ( { type : 'info' , message : `No module found.` } )
Original file line number Diff line number Diff line change 1
1
const { LogUtils } = require ( './shared/log.utils' )
2
2
3
+ const { ConfigurationFileNotExist } = require ( './services/config' )
4
+
3
5
module . exports = exports = fileService => ( ) => {
4
- const scripts = fileService . scripts
6
+ let scripts = [ ]
7
+
8
+ try {
9
+ scripts = fileService . scripts
10
+ } catch ( e ) {
11
+ if ( e instanceof ConfigurationFileNotExist ) {
12
+ LogUtils . log ( { message : 'Unable to load scripts without knowing where are stored the data.' } )
13
+ LogUtils . log ( { type : 'error' , message : 'No configuration file. You need to run the init command before.' } )
14
+ return
15
+ }
16
+ }
5
17
6
18
if ( scripts . length < 1 ) {
7
19
LogUtils . log ( { type : 'info' , message : `No scripts found.` } )
You can’t perform that action at this time.
0 commit comments