File tree 1 file changed +10
-5
lines changed
1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -83,13 +83,18 @@ linkCodePush(androidStagingDeploymentKey, iosStagingDeploymentKey);
83
83
function createCodePushApp ( name , os ) {
84
84
try {
85
85
console . log ( `Creating CodePush app "${ name } " to release updates for ${ os } ...` ) ;
86
- const appResult = execCommand ( `appcenter apps create -d ${ name } -n ${ name } -o ${ os } -p React-Native --output json` ) ;
87
- const app = JSON . parse ( appResult ) ;
88
- owner = app . owner . name ;
89
- console . log ( `App "${ name } " has been created \n` ) ;
86
+ try {
87
+ const appResult = execCommand ( `appcenter apps create -d ${ name } -n ${ name } -o ${ os } -p React-Native --output json` ) ;
88
+ const app = JSON . parse ( appResult ) ;
89
+ owner = app . owner . name ;
90
+ console . log ( `App "${ name } " has been created \n` ) ;
91
+ } catch ( e ) {
92
+ console . log ( "Error: " , e ) ;
93
+ console . log ( `Please check that you haven't application with "${ name } " name on portal` ) ;
94
+ }
90
95
execCommand ( `appcenter codepush deployment add -a ${ owner } /${ name } Staging` ) ;
91
96
} catch ( e ) {
92
- console . log ( `App " ${ name } " already exists \n` ) ;
97
+ console . log ( "Error" , e ) ;
93
98
}
94
99
const deploymentKeysResult = execCommand ( `appcenter codepush deployment list -a ${ owner } /${ name } -k --output json` ) ;
95
100
const deploymentKeys = JSON . parse ( deploymentKeysResult ) ;
You can’t perform that action at this time.
0 commit comments