mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-07 14:18:47 +00:00
Revert "Merge pull request #609 from benphelps/fix-576"
This reverts commita7f290dfdd
, reversing changes made tocf38395100
.
This commit is contained in:
parent
02b0604ad7
commit
7b474d4cef
2 changed files with 4 additions and 17 deletions
|
@ -1,6 +1,6 @@
|
|||
/* eslint-disable no-console */
|
||||
import { join } from "path";
|
||||
import { existsSync, copyFile, readFileSync, statSync } from "fs";
|
||||
import { existsSync, copyFile, readFileSync } from "fs";
|
||||
|
||||
import yaml from "js-yaml";
|
||||
|
||||
|
@ -32,18 +32,5 @@ export function getSettings() {
|
|||
|
||||
const settingsYaml = join(process.cwd(), "config", "settings.yaml");
|
||||
const fileContents = readFileSync(settingsYaml, "utf8");
|
||||
|
||||
let stats;
|
||||
try {
|
||||
stats = statSync(settingsYaml);
|
||||
} catch (e) {
|
||||
stats = {};
|
||||
}
|
||||
|
||||
const yamlLoaded = yaml.load(fileContents) ?? {};
|
||||
|
||||
return {
|
||||
...yamlLoaded,
|
||||
isValid: fileContents !== "-\n" && stats.size !== 2 // see https://github.com/benphelps/homepage/pull/609
|
||||
};
|
||||
return yaml.load(fileContents) ?? {};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue