Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

Commit

Permalink
Tune the error message
Browse files Browse the repository at this point in the history
  • Loading branch information
mykola-mokhnach committed May 4, 2020
1 parent 6017970 commit d36997c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/net.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ async function uploadFileToFtp (localFileStream, remoteUrl, uploadOptions = {})
port: port || 21,
auth,
};

log.debug(`${protocol} upload options: ${JSON.stringify(ftpOpts)}`);
return await new B((resolve, reject) => {
new Ftp(ftpOpts).put(localFileStream, pathname, (err) => {
Expand Down Expand Up @@ -154,7 +153,7 @@ async function uploadFile (localPath, remotePath, uploadOptions = {}) {
} else {
throw new Error(`Cannot upload the file at '${localPath}' to '${remotePath}'. ` +
`Unsupported remote protocol '${remoteUrl.protocol}'. ` +
`Only http/https and ftp protocols are supported.`);
`Only http/https and ftp/ftps protocols are supported.`);
}
if (isMetered) {
log.info(`Uploaded '${localPath}' of ${toReadableSizeString(size)} size in ${timer.getDuration().asSeconds.toFixed(3)}s`);
Expand Down

0 comments on commit d36997c

Please sign in to comment.