Skip to content

Commit dc0905f

Browse files
authored
fix: Fix configure:environments:set-current command (#568)
1 parent 3d3b19f commit dc0905f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/commands/configure/environments/add.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,9 @@ class EnvironmentsAddCommand extends BoxCommand {
9393
newEnvironment.hasInLinePrivateKey = false;
9494
}
9595
if (flags['set-as-current']) {
96-
configObj.default = args.name;
96+
environmentsObj.default = environmentName;
9797
}
98+
9899
// If no default environment is defined, this newly added environment will be set as the default
99100
if (!environmentsObj.default) {
100101
environmentsObj.default = environmentName;

src/commands/configure/environments/set-current.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class EnvironmentsSetCurrentCommand extends BoxCommand {
88
async run() {
99
const { args } = await this.parse(EnvironmentsSetCurrentCommand);
1010
let environmentsObj = await this.getEnvironments();
11-
let name = args.name;
11+
let name = args.id;
1212

1313
if (!name) {
1414
let answers = await inquirer.prompt([
@@ -44,7 +44,7 @@ EnvironmentsSetCurrentCommand.flags = {
4444

4545
EnvironmentsSetCurrentCommand.args = {
4646
id: Args.string({
47-
name: 'name',
47+
name: 'id',
4848
required: false,
4949
hidden: false,
5050
description: 'Name of the environment'

0 commit comments

Comments
 (0)