mirror of
https://github.com/atom/atom.git
synced 2026-02-18 10:31:54 -05:00
add failure mode for reading project settings
This commit is contained in:
@@ -197,7 +197,11 @@ const readProjectSettingsSync = (filepath, executedFrom) => {
|
||||
}
|
||||
try {
|
||||
const readPath = path.isAbsolute(filepath) ? filepath : path.join(executedFrom, filepath)
|
||||
return CSON.readFileSync(readPath)
|
||||
const contents = CSON.readFileSync(readPath)
|
||||
if (contents.paths || content.config) {
|
||||
return contents
|
||||
}
|
||||
|
||||
} catch (e) {
|
||||
throw new Error('Unable to read supplied config file.')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user