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 {
16
16
FailedToSelectSubObject ,
17
17
EmptyStdinOrPromptResponse ,
18
18
} from '@app-config/core' ;
19
- import { promptUser , consumeStdin , asEnvOptions } from '@app-config/node' ;
19
+ import { promptUser , consumeStdin , asEnvOptions , currentEnvironment } from '@app-config/node' ;
20
20
import { checkTTY , LogLevel , logger } from '@app-config/logging' ;
21
21
import {
22
22
LoadedConfiguration ,
@@ -628,16 +628,19 @@ export const cli = yargs
628
628
} ,
629
629
async ( opts ) => {
630
630
const environmentOptions = await loadEnvironmentOptions ( opts ) ;
631
+ const environment = currentEnvironment ( environmentOptions ) ;
631
632
632
633
const keys = await loadSymmetricKeys ( undefined , environmentOptions ) ;
633
634
const teamMembers = await loadTeamMembersLazy ( environmentOptions ) ;
634
635
635
- let revision : number ;
636
+ let revision : string ;
636
637
637
638
if ( keys . length > 0 ) {
638
- revision = latestSymmetricKeyRevision ( keys ) + 1 ;
639
+ revision = latestSymmetricKeyRevision ( keys ) ;
640
+ } else if ( environment ) {
641
+ revision = `${ environment } -1` ;
639
642
} else {
640
- revision = 1 ;
643
+ revision = '1' ;
641
644
}
642
645
643
646
await saveNewSymmetricKey (
You can’t perform that action at this time.
0 commit comments