File tree Expand file tree Collapse file tree 4 files changed +13
-4
lines changed
Strings/resources.resjson/en-US Expand file tree Collapse file tree 4 files changed +13
-4
lines changed Original file line number Diff line number Diff line change 3636 "loc.messages.Disconnected": "disconnected",
3737 "loc.messages.DisconnectHost": "disconnecting from: %s",
3838 "loc.messages.FTPConnected": "connected: %s",
39+ "loc.messages.InvalidFTPOptions": "There was an error when reading FTP options: %s",
3940 "loc.messages.FTPNoHostSpecified": "The FTP server URL must include a host name",
4041 "loc.messages.FTPNoProtocolSpecified": "The FTP server URL must begin with ftp:// or ftps://",
4142 "loc.messages.NoFilesFound": "Could not find any files to upload",
Original file line number Diff line number Diff line change @@ -261,7 +261,13 @@ async function run() {
261261 tl . setResourcePath ( path . join ( __dirname , "task.json" ) ) ;
262262
263263 const tries = 3 ;
264- const ftpOptions : FtpOptions = getFtpOptions ( ) ;
264+ let ftpOptions : FtpOptions ;
265+ try {
266+ ftpOptions = getFtpOptions ( ) ;
267+ } catch ( err ) {
268+ tl . setResult ( tl . TaskResult . Failed , tl . loc ( 'InvalidFTPOptions' , err ) ) ;
269+ return ;
270+ }
265271
266272 if ( ! ftpOptions . serverEndpointUrl . protocol ) {
267273 tl . setResult ( tl . TaskResult . Failed , tl . loc ( "FTPNoProtocolSpecified" ) ) ;
Original file line number Diff line number Diff line change 1919 "version" : {
2020 "Major" : 2 ,
2121 "Minor" : 186 ,
22- "Patch" : 0
22+ "Patch" : 1
2323 },
2424 "minimumAgentVersion" : " 2.182.1" ,
2525 "instanceNameFormat" : " FTP Upload: $(rootFolder)" ,
195195 "Disconnected" : " disconnected" ,
196196 "DisconnectHost" : " disconnecting from: %s" ,
197197 "FTPConnected" : " connected: %s" ,
198+ "InvalidFTPOptions" : " There was an error when reading FTP options: %s" ,
198199 "FTPNoHostSpecified" : " The FTP server URL must include a host name" ,
199200 "FTPNoProtocolSpecified" : " The FTP server URL must begin with ftp:// or ftps://" ,
200201 "NoFilesFound" : " Could not find any files to upload" ,
203204 "UploadSucceedRes" : " FTP upload successful" ,
204205 "UploadFailed" : " Ftp Upload failed"
205206 }
206- }
207+ }
Original file line number Diff line number Diff line change 1919 "version" : {
2020 "Major" : 2 ,
2121 "Minor" : 186 ,
22- "Patch" : 0
22+ "Patch" : 1
2323 },
2424 "minimumAgentVersion" : " 2.182.1" ,
2525 "instanceNameFormat" : " ms-resource:loc.instanceNameFormat" ,
195195 "Disconnected" : " ms-resource:loc.messages.Disconnected" ,
196196 "DisconnectHost" : " ms-resource:loc.messages.DisconnectHost" ,
197197 "FTPConnected" : " ms-resource:loc.messages.FTPConnected" ,
198+ "InvalidFTPOptions" : " ms-resource:loc.messages.InvalidFTPOptions" ,
198199 "FTPNoHostSpecified" : " ms-resource:loc.messages.FTPNoHostSpecified" ,
199200 "FTPNoProtocolSpecified" : " ms-resource:loc.messages.FTPNoProtocolSpecified" ,
200201 "NoFilesFound" : " ms-resource:loc.messages.NoFilesFound" ,
You can’t perform that action at this time.
0 commit comments