New version doesn't upload any file
Closed this issue · 11 comments
Hi,
New version doesn't upload any file, instead the previous 0.0.11 version does. (I tried the same configuration for both version)
The error is "No such file"
My configuration:
'sftp-deploy': {
push: {
auth: {
host: 'mysite.tld',
port: 22007,
authKey: 'mykey'
},
src: '../mytheme',
dest: '/home/myaccount/public_html/wordpress/wp-content/themes/mytheme',
exclusions: [
'.sass-cache',
'node_modules',
'css/src/*',
'js/src/*',
'screenshot.png',
'.ftppass',
'.csslintrc',
'Gruntfile.js',
'package.json',
],
server_sep: '/',
progress: true
}
},
The gruntfile is inside mytheme
My SO is windows
is there any other configuration to be done?
(I'm sorry for my bad English :-))
There were a host of changes lately. Try switching server_sep
to serverSep
.
Are you using Windows?
I am and, after some hunting, found that this line was the culprit for me.
Added a check for Windows-style path separators, and all is working again.
Hi thanks for this solution, but in environment that Windows machine send some folders to UNIX machine it is fails. There is muy "patch" that I can´t sure to implements correctly for general case:
function getFiles(toTransfer){
var ret = [];
for(var n in toTransfer ){
for( var k in toTransfer[n]){
//ret.push( (n==path.sep?"":n+path.sep)+toTransfer[n][k]); //work in WIN to WIN & UNIX to UNIX
ret.push( (n==path.sep?"":n+"/")+toTransfer[n][k]); //work in WIN to UNIX
//ret.push( (n==path.sep?"":n+"\\")+toTransfer[n][k]); //work in UNIX to WIN
}
}
return ret;
}
I'm a relative novice at github ;)
Thanks for the report. I'd have to test it myself but I think the code already there is correct. It's using the local path separator. The only case we would want to change the separator is for the server, which we do. Your example hard-codes the path, which is something we don't want to do since we are using node's interpretation of the local path separator and serverSep
from the config for the server paths.
I'd also like to meet the person that is uploading from Unix or Mac to a Windows server. Poor guy. ;)
Thanx a lot thrashr888, serverSep works 👍 :-)
Sorry for my late reply :-)
D'ho! :-)
Now I have error "No such file" when upload files.
Same configuration above, new version of sftp-deploy doesn't upload (only some file are uploaded, all of the other doesn't), old version does (upload all).
Have you any advice?
the npm repository it isn't updated yet, it is your possible trouble
I've tried to download sftp github repo and when I upload files on vps any css and js in directory are put out and renamed in css\bootstrap.css and js\script.js
I just published the most recent version. Try again?
Closing for now. Feel free to reopen it if there's still an issue.
Hey,
I have the same problem with slash separator on Windows 7 to linux serveur.
- Add option serverSep : '/' doesn't work for me. There are no changes.
I've tried zicrox's solution and it works fine (change getFiles function on /node_modules/grunt-sftp-deploy/tasks/sftp-deploy.js).
Thanks !