Skip to content

Commit

Permalink
fix(command): environment variables are always invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
c4spar committed May 21, 2020
1 parent 0405244 commit fa131eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/command/lib/base-command.ts
Expand Up @@ -431,7 +431,7 @@ export class BaseCommand<O = any, A extends Array<any> = any> {
throw this.error( new Error( `Environment variable already exists: ${ name }` ) );
}

const details = this.parseArgsDefinition( result.typeDefinition );
const details: IArgumentDetails[] = this.parseArgsDefinition( result.typeDefinition );

if ( details.length > 1 ) {
throw this.error( new Error( `An environment variable can only have one value but got: ${ name }` ) );
Expand All @@ -444,7 +444,7 @@ export class BaseCommand<O = any, A extends Array<any> = any> {
this.cmd.envVars.push( {
names: result.args,
description,
type: result.typeDefinition,
type: details[ 0 ].type,
details: details.shift() as IArgumentDetails
} );

Expand Down

0 comments on commit fa131eb

Please sign in to comment.