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

Commit

Permalink
Fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
utkarsh-dixit committed Jul 8, 2019
1 parent 2ff4417 commit eb7bdf1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
16 changes: 8 additions & 8 deletions packages/shipit-cli/src/Shipit.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ class Shipit extends Orchestrator {
this.options = { ...defaultOptions, ...options }
this.environment = options.environment

this.show_progress = false;
this.show_stats = false;
this.showProgress = false;
this.showStats = false;

this.initializeEvents()

Expand Down Expand Up @@ -230,8 +230,8 @@ class Shipit extends Orchestrator {
const defaultOptions = {
ignores: this.config && this.config.ignores ? this.config.ignores : [],
rsync: this.config && this.config.rsync ? this.config.rsync : [],
show_progress: this.show_progress,
show_stats: this.show_stats,
showProgress: this.showProgress,
showStats: this.showStats,
}
const copyOptions = { ...defaultOptions, ...options }

Expand All @@ -256,8 +256,8 @@ class Shipit extends Orchestrator {
const defaultOptions = {
ignores: this.config && this.config.ignores ? this.config.ignores : [],
rsync: this.config && this.config.rsync ? this.config.rsync : [],
show_progress: this.show_progress,
show_stats: this.show_stats,
showProgress: this.showProgress,
showStats: this.showStats,
}
const copyOptions = { ...defaultOptions, ...options }
return this.pool.copyToRemote(src, dest, copyOptions)
Expand All @@ -280,8 +280,8 @@ class Shipit extends Orchestrator {
const defaultOptions = {
ignores: this.config && this.config.ignores ? this.config.ignores : [],
rsync: this.config && this.config.rsync ? this.config.rsync : [],
show_progress: this.show_progress,
show_stats: this.show_stats,
showProgress: this.showProgress,
showStats: this.showStats,
}
const copyOptions = { ...defaultOptions, ...options }
return this.pool.copyFromRemote(src, dest, copyOptions)
Expand Down
4 changes: 2 additions & 2 deletions packages/shipit-cli/src/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ program
.option('--require <files...>', 'Script required before launching Shipit')
.option('--tasks', 'List available tasks')
.option('--environments', 'List available environments')
.option('-p, --showProgress', 'Show rsync Progress')
.option('-s, --showStats', 'Show rsync Stats')
.option('-p, --show-progress', 'Show rsync Progress')
.option('-s, --show-stats', 'Show rsync Stats')

program.parse(process.argv)

Expand Down
8 changes: 4 additions & 4 deletions packages/ssh-pool/src/Connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -331,19 +331,19 @@ class Connection {
tty: this.options.tty,
})

let additionalArgs = (typeof rsync === 'string' ? [rsync] : rsync);
if(cmdOptions.show_progress){
const additionalArgs = (typeof rsync === 'string' ? [rsync] : rsync);
if(cmdOptions.showProgress){
additionalArgs.push("--progress");
}
if(cmdOptions.show_stats){
if(cmdOptions.showStats){
additionalArgs.push("--stats");
}

const cmd = formatRsyncCommand({
src,
dest,
remoteShell: sshCommand,
additionalArgs: additionalArgs,
additionalArgs,
excludes: ignores,
})

Expand Down

0 comments on commit eb7bdf1

Please sign in to comment.