Skip to content

Commit

Permalink
updateconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
playground committed Apr 21, 2023
1 parent 8f9ac6c commit ddc03a5
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 25 deletions.
39 changes: 28 additions & 11 deletions build/common/src/utils.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/common/src/utils.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hzn-cli",
"version": "0.5.7",
"version": "0.5.8",
"description": "Open Horizon CLI toolkit helps streamline the process of preparing node agents and perform tasks between orgs environments",
"main": "./build/index.js",
"bin": {
Expand Down
41 changes: 29 additions & 12 deletions src/common/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -408,20 +408,37 @@ export class Utils {
observer.next('Please provide --config_file name')
observer.complete()
} else if(setup == SetupEnvironment.autoSetupAllInOne || setup == SetupEnvironment.autoSetupCliInContainer || setup == SetupEnvironment.autoSetupAnaxInContainer) {
const config = jsonfile.readFileSync(configFile);
const pEnv: any = process.env;
const org = config.org
Object.keys(org).forEach((key) => {
pEnv[key] = org[key]
})
this.proceedWithAutoInstall(setup)
let configJson
this.updateConfig(configFile)
.subscribe({
complete: () => {
observer.next('')
observer.complete();
next: (json) => {
configJson = json;
},
error: (err) => observer.error(err)
})
complete: () => {
this.proceedWithAutoInstall(setup)
.subscribe({
complete: () => {
observer.next('')
observer.complete();
},
error: (err) => observer.error(err)
})
}
})
//const config = jsonfile.readFileSync(configFile);
//const pEnv: any = process.env;
//const org = config.org
//Object.keys(org).forEach((key) => {
// pEnv[key] = org[key]
//})
//this.proceedWithAutoInstall(setup)
//.subscribe({
// complete: () => {
// observer.next('')
// observer.complete();
// },
// error: (err) => observer.error(err)
//})
} else if(setup == SetupEnvironment.autoUpdateConfigFiles) {
let configJson
this.updateConfig(configFile)
Expand Down

0 comments on commit ddc03a5

Please sign in to comment.