We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c51daaf commit ff6a7e8Copy full SHA for ff6a7e8
src/node/cli.ts
@@ -357,10 +357,14 @@ export async function readConfigFile(configPath?: string): Promise<Args> {
357
}
358
359
const configFile = await fs.readFile(configPath)
360
- const config = yaml.safeLoad(configFile.toString(), {
+ let config = yaml.safeLoad(configFile.toString(), {
361
filename: configPath,
362
})
363
364
+ if (typeof config !== "object") {
365
+ config = {}
366
+ }
367
+
368
// We convert the config file into a set of flags.
369
// This is a temporary measure until we add a proper CLI library.
370
const configFileArgv = Object.entries(config).map(([optName, opt]) => {
0 commit comments