# frozen_string_literal: true

include Capistrano::DSL

require 'dkdeploy/i18n'

namespace :current_folder do
  desc "Delete current folder unless it's a symlink"
  task :remove_unlesss_symlinked do
    on release_roles :all do
      if test "[ -d #{current_path} && ! -L #{current_path} ]"
        execute :rm, '-rf', current_path
      else
        info I18n.t('info.ignoring_current_folder', scope: :dkdeploy)
      end
    end
  end
end

# frozen_string_literal: true

include Capistrano::DSL

require 'dkdeploy/i18n'

namespace :current_folder do
  desc "Delete current folder unless it's a symlink"
  task :remove_unlesss_symlinked do
    on release_roles :all do
      if test "[ -d #{current_path} ] && [ ! -L #{current_path} ]"
        execute :rm, '-rf', current_path
      else
        info I18n.t('info.ignoring_current_folder', scope: :dkdeploy)
      end
    end
  end
end

Use correct test statement for task "remove_unless_symlinked"
Use correct test statement for task "remove_unless_symlinked"

Fixes #54
