Skip to content

Commit

Permalink
[Patch][Bug] fix for reading xarcOptions with legacy (#1757)
Browse files Browse the repository at this point in the history
Co-authored-by: Durrab Khan <[email protected]>
  • Loading branch information
durrab and Durrab Khan authored Nov 17, 2020
1 parent b7f4e88 commit 83625cf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/xarc-app-dev/src/config/archetype.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { XarcOptions } from "./opt2/xarc-options";
import { getDevArchetypeLegacy } from "./options";
const _ = require("lodash");
const getEnvProxy = require("./env-proxy");
import { saveXarcOptions } from "../lib/utils";
import { saveXarcOptions, loadXarcOptions } from "../lib/utils";

let cachedArchetype = null;

Expand All @@ -23,7 +23,9 @@ module.exports = function getDevOptions(user: XarcOptions = {}) {

// first get legacy configs
const legacy = getDevArchetypeLegacy();

// try to read xarc-options.json if it exist and merge it into legacy
const xarcOptions = loadXarcOptions();
user = _.merge({}, user, xarcOptions);
const proxy = getEnvProxy();

// proxy config was not set in legacy, so add to top level here
Expand Down

0 comments on commit 83625cf

Please sign in to comment.