@axway/axway-central-cli 2.14.1 → 2.14.2
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/dist/common/utils.js +1 -1
- package/package.json +1 -1
package/dist/common/utils.js
CHANGED
|
@@ -99,7 +99,7 @@ const loadAndVerifySpecs = async (specFilePath, allowedKinds) => {
|
|
|
99
99
|
try {
|
|
100
100
|
docs = (0, _jsYaml.loadAll)(await (0, _fsExtra.readFile)(specFilePath, 'utf8'));
|
|
101
101
|
} catch (e) {
|
|
102
|
-
throw new Error(`File content is invalid.`);
|
|
102
|
+
throw new Error(e.reason && e.reason.includes('null byte') ? `File encoding is invalid, please make sure it is using UTF-8` : `File content is invalid.`);
|
|
103
103
|
} // if user pass an array of json objects, docs const will have nested array, workaround for this:
|
|
104
104
|
|
|
105
105
|
|