lib/docman/commands/create_symlink_cmd.rb in docman-0.0.23 vs lib/docman/commands/create_symlink_cmd.rb in docman-0.0.24

- old
+ new

@@ -11,14 +11,14 @@ raise "Context should be of type 'Info'" unless @context.is_a? Docman::Info raise "Directory #{File.join(@context['docroot_config'].docroot_dir, self['target_dir'])} not exists" unless File.directory? File.join(@context['docroot_config'].docroot_dir, self['target_dir']) end def execute - source_path = File.join(@context['docroot_config'].docroot_dir, self['target_dir']) Dir.chdir source_path + source_path = File.join(@context['docroot_config'].docroot_dir, self['target_dir']) source_pathname = Pathname.new source_path target_pathname = Pathname.new @context['full_build_path'] relative_path = target_pathname.relative_path_from source_pathname - puts `ln -s #{relative_path} #{@context['name']}` + puts `ln -f -s #{relative_path} .` end end end \ No newline at end of file