mirror of
https://github.com/capistrano/capistrano
synced 2023-03-27 23:21:18 -04:00
Merge pull request #1609 from will-in-wi/rubocop_if_unless_modifier
Enable the IfUnlessModifier cop
This commit is contained in:
commit
90574e065b
2 changed files with 2 additions and 8 deletions
|
@ -35,8 +35,6 @@ Style/BlockDelimiters:
|
|||
Enabled: false
|
||||
Style/ConditionalAssignment:
|
||||
Enabled: false
|
||||
Style/IfUnlessModifier:
|
||||
Enabled: false
|
||||
Style/Lambda:
|
||||
Enabled: false
|
||||
Style/SingleLineBlockParams:
|
||||
|
|
|
@ -124,9 +124,7 @@ namespace :deploy do
|
|||
target = release_path.join(dir)
|
||||
source = shared_path.join(dir)
|
||||
next if test "[ -L #{target} ]"
|
||||
if test "[ -d #{target} ]"
|
||||
execute :rm, "-rf", target
|
||||
end
|
||||
execute :rm, "-rf", target if test "[ -d #{target} ]"
|
||||
execute :ln, "-s", source, target
|
||||
end
|
||||
end
|
||||
|
@ -142,9 +140,7 @@ namespace :deploy do
|
|||
target = release_path.join(file)
|
||||
source = shared_path.join(file)
|
||||
next if test "[ -L #{target} ]"
|
||||
if test "[ -f #{target} ]"
|
||||
execute :rm, target
|
||||
end
|
||||
execute :rm, target if test "[ -f #{target} ]"
|
||||
execute :ln, "-s", source, target
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue