Skip to content

Commit b87504f

Browse files
Fix regression in reading json/yaml files
1 parent f55368b commit b87504f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/interface/cli/helpers/general.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,9 @@ const crudFilenameOption = (yargs, options = {}) => {
111111
try {
112112
const rawFile = fs.readFileSync(path.resolve(process.cwd(), arg), 'utf8');
113113
if (arg.endsWith('.json')) {
114-
return options.raw ? rawFile : JSON.parse();
114+
return options.raw ? rawFile : JSON.parse(rawFile);
115115
} else if (arg.endsWith('.yml') || arg.endsWith('yaml')) {
116-
return options.raw ? rawFile : yaml.safeLoad();
116+
return options.raw ? rawFile : yaml.safeLoad(rawFile);
117117
} else {
118118
throw new CFError('File extension is not recognized');
119119
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "codefresh",
3-
"version": "0.9.11",
3+
"version": "0.9.12",
44
"description": "Codefresh command line utility",
55
"main": "index.js",
66
"preferGlobal": true,

0 commit comments

Comments
 (0)