File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ import {
1616 FailedToSelectSubObject ,
1717 EmptyStdinOrPromptResponse ,
1818} from '@app-config/core' ;
19- import { promptUser , consumeStdin , asEnvOptions } from '@app-config/node' ;
19+ import { promptUser , consumeStdin , asEnvOptions , currentEnvironment } from '@app-config/node' ;
2020import { checkTTY , LogLevel , logger } from '@app-config/logging' ;
2121import {
2222 LoadedConfiguration ,
@@ -628,16 +628,19 @@ export const cli = yargs
628628 } ,
629629 async ( opts ) => {
630630 const environmentOptions = await loadEnvironmentOptions ( opts ) ;
631+ const environment = currentEnvironment ( environmentOptions ) ;
631632
632633 const keys = await loadSymmetricKeys ( undefined , environmentOptions ) ;
633634 const teamMembers = await loadTeamMembersLazy ( environmentOptions ) ;
634635
635- let revision : number ;
636+ let revision : string ;
636637
637638 if ( keys . length > 0 ) {
638- revision = latestSymmetricKeyRevision ( keys ) + 1 ;
639+ revision = latestSymmetricKeyRevision ( keys ) ;
640+ } else if ( environment ) {
641+ revision = `${ environment } -1` ;
639642 } else {
640- revision = 1 ;
643+ revision = '1' ;
641644 }
642645
643646 await saveNewSymmetricKey (
You can’t perform that action at this time.
0 commit comments