1
0
Fork 0
mirror of https://github.com/capistrano/capistrano synced 2023-03-27 23:21:18 -04:00

Enable the IfUnlessModifier cop

This commit is contained in:
William Johnston 2016-03-01 09:19:42 -06:00 committed by William Johnston
parent fb82ecea53
commit a0ac67d84f
2 changed files with 2 additions and 8 deletions

View file

@ -41,8 +41,6 @@ Style/BlockDelimiters:
Enabled: false
Style/ConditionalAssignment:
Enabled: false
Style/IfUnlessModifier:
Enabled: false
Style/Lambda:
Enabled: false
Style/EmptyLiteral:

View file

@ -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