Skip to content
This repository has been archived by the owner on Apr 13, 2020. It is now read-only.

Commit

Permalink
attempt to fix introspection test failure (#422)
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisseah authored Mar 19, 2020
1 parent 47ff16d commit 6398bbf
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/commands/deployment/onboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,16 @@ export const setConfiguration = (
): boolean => {
try {
const data = readYaml<ConfigYaml>(defaultConfigFile());
data.introspection!.azure!.account_name = storageAccountName;
data.introspection!.azure!.table_name = storageTableName;
if (!data.introspection) {
data.introspection = {
azure: {}
};
} else if (!data.introspection.azure) {
data.introspection.azure = {};
}

data.introspection.azure!.account_name = storageAccountName;
data.introspection.azure!.table_name = storageTableName;
const jsonData = yaml.safeDump(data);
logger.verbose(jsonData);
fs.writeFileSync(defaultConfigFile(), jsonData);
Expand Down

0 comments on commit 6398bbf

Please sign in to comment.