@caweb/cli 1.12.2 → 1.12.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/commands/sites/validation.js +0 -1
- package/lib/spinner.js +9 -9
- package/package.json +1 -1
package/lib/spinner.js
CHANGED
|
@@ -70,25 +70,25 @@ const withSpinner =
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
spinner.fail( msg )
|
|
73
|
-
process.exit( 1 );
|
|
74
|
-
|
|
75
73
|
|
|
76
|
-
|
|
77
|
-
}else if( error ){
|
|
78
|
-
//
|
|
74
|
+
// An Error was thrown.
|
|
75
|
+
}else if( error && 'object' === typeof error ){
|
|
76
|
+
// If the error has a message, use that.
|
|
79
77
|
spinner.fail(
|
|
80
78
|
typeof error === 'string' ? error : error.message
|
|
81
79
|
);
|
|
82
|
-
// Disable reason: Using console.error() means we get a stack trace.
|
|
83
|
-
console.error( error );
|
|
84
|
-
process.exit( 1 );
|
|
85
80
|
|
|
81
|
+
// Error is an unknown error. That means there was a bug in our code.
|
|
86
82
|
}else{
|
|
87
83
|
spinner.fail( 'An unknown error occurred.' );
|
|
88
|
-
|
|
84
|
+
|
|
85
|
+
// Using console.error() means we get a stack trace.
|
|
86
|
+
console.error( error );
|
|
89
87
|
|
|
90
88
|
}
|
|
91
89
|
|
|
90
|
+
process.exit( 1 );
|
|
91
|
+
|
|
92
92
|
}
|
|
93
93
|
);
|
|
94
94
|
};
|