We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f473e53 commit 09b21e0Copy full SHA for 09b21e0
1 file changed
src/config.ts
@@ -54,16 +54,18 @@ function normalizeConfig(data: unknown): Partial<TunnelConfig> {
54
}
55
56
function readConfigFile(dir: string): Partial<TunnelConfig> {
57
- for (const fileName of [PRIMARY_CONFIG_FILE, LEGACY_CONFIG_FILE]) {
+ const merged: Partial<TunnelConfig> = {};
58
+
59
+ for (const fileName of [LEGACY_CONFIG_FILE, PRIMARY_CONFIG_FILE]) {
60
try {
61
const raw = readFileSync(resolve(dir, fileName), "utf-8");
- return normalizeConfig(JSON.parse(raw));
62
+ Object.assign(merged, normalizeConfig(JSON.parse(raw)));
63
} catch {
64
// Try next candidate.
65
66
67
- return {};
68
+ return merged;
69
70
71
function parseArgs(argv: string[]): Partial<TunnelConfig> {
0 commit comments