You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gulp-rsync does not seem to honor the times configuration option.
To replicate:
Set the command option to true for debugging
Set the silent option to false for debugging
Set the archive option to either true or false (try both ways - it makes no difference)
Set the silent option to false (false overrides a behavior of archive but is not mutually-exclusive in rsync)
Since you set command to true, you will see the command that is being run, and it will not include the --no-times long option
Expected behavior:
When the times configuration parameter is set to either true or false the corresponding --times/--no-times command line parameter should be set for rsync (either -t or --times to enable, or --no-times to disable). Note that setting archive to true sets the --times command line parameter to true internally within rsync, so having --archive and --times set at the same time is non-harmful, but redundant. However, having --archive and --no-times set at the same time is useful and perfectly valid.
Here is my entire gulp task:
gulp.task( 'copy-sources',
function( done )
{
gulp.src([
srcDir
])
.pipe(
rsync({
command: true, // set this to true to see the rsync command that will run
root: srcDir, // when set to the source code root, rsync will show '.' (cwd) as the source directory
hostname: dstHost,
destination: dstDir,
archive: true,
times: false,
silent: false, // set to true to make the console less chatty
shell: 'ssh',
clean: false, // set to false to leave "missing" files from the orgin alone on the destination. true to delete them (sync)
dryrun: false, // set to true to see what will be done without doing anything
recursive: true,
exclude: [ '.DS_Store', '.buildpath', '.externalToolBuilders', '.git',
'.gitignore', '.project',, '.settings', 'logs' ] // directories you don't want to sync
})
);
done();
}
);
Temporary workaround:
This is kludgy, and I'm sure you would do it differently, but I was able to insert this at line 81 of rsync.js to get the desired results:
It may be worth noting that the rsync command does not change to include either --times or the --no-times option using any combination of true or false for the archive or the times configuration option. The times configuration option seems to have zero effect on anything.
My particular use case requires all of the options supplied by archive except that I need to drop modification times, which I was able to achieve using the workaround that I wouldn't have had to implement if the times configuration option were working as expected.
The text was updated successfully, but these errors were encountered:
gulp-rsync
does not seem to honor thetimes
configuration option.To replicate:
command
option to true for debuggingsilent
option to false for debuggingarchive
option to either true or false (try both ways - it makes no difference)silent
option to false (false overrides a behavior ofarchive
but is not mutually-exclusive in rsync)Since you set
command
to true, you will see the command that is being run, and it will not include the--no-times
long optionExpected behavior:
When the
times
configuration parameter is set to eithertrue
orfalse
the corresponding--times
/--no-times
command line parameter should be set for rsync (either-t
or--times
to enable, or--no-times
to disable). Note that settingarchive
to true sets the--times
command line parameter to true internally within rsync, so having--archive
and--times
set at the same time is non-harmful, but redundant. However, having--archive
and--no-times
set at the same time is useful and perfectly valid.Here is my entire gulp task:
Temporary workaround:
This is kludgy, and I'm sure you would do it differently, but I was able to insert this at line 81 of rsync.js to get the desired results:
It may be worth noting that the
rsync
command does not change to include either--times
or the--no-times
option using any combination of true or false for thearchive
or thetimes
configuration option. Thetimes
configuration option seems to have zero effect on anything.My particular use case requires all of the options supplied by
archive
except that I need to drop modification times, which I was able to achieve using the workaround that I wouldn't have had to implement if thetimes
configuration option were working as expected.The text was updated successfully, but these errors were encountered: