File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed
src/commands/package/pushupgrade Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,10 @@ Org list file is empty.
47
47
48
48
Org list file is invalid.
49
49
50
+ # error.invalid-org-list
51
+
52
+ Org list has invalid org/orgs.
53
+
50
54
# examples
51
55
52
56
sf package pushupgrade schedule --package-version 04txyz --scheduled-start-time "2024-12-06T21:00:00" --org-list upgrade-orgs.csv --target-dev-hub myHub
Original file line number Diff line number Diff line change @@ -86,11 +86,15 @@ async function readOrgListFile(filePath: string): Promise<string[]> {
86
86
}
87
87
88
88
function getOrgListFromInput ( orgInput : string ) : string [ ] {
89
- if ( ! orgInput ) {
90
- throw new Error ( 'Org input is required' ) ;
91
- }
89
+ try {
90
+ if ( ! orgInput ) {
91
+ throw new Error ( 'Org input is required' ) ;
92
+ }
92
93
93
- const orgList = orgInput . split ( ',' ) . map ( ( org ) => org . trim ( ) ) ;
94
+ const orgList = orgInput . split ( ',' ) . map ( ( org ) => org . trim ( ) ) ;
94
95
95
- return orgList . filter ( ( org ) => org . length > 0 ) ;
96
+ return orgList . filter ( ( org ) => org . length > 0 ) ;
97
+ } catch ( error ) {
98
+ throw new SfError ( messages . getMessage ( 'error.invalid-org-list' ) , error as string | undefined ) ;
99
+ }
96
100
}
You can’t perform that action at this time.
0 commit comments