Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Replaced shell call to readlink with library pathname.realpath

  • Loading branch information...
commit 202ea55d4de7ec837b15c62a2be26ada1737a95e 1 parent e406c4a
Troels authored
Showing with 2 additions and 5 deletions.
  1. +2 −5 generators/handsoap/handsoap_generator.rb
View
7 generators/handsoap/handsoap_generator.rb
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
require "#{File.dirname(__FILE__)}/../../lib/handsoap/parser.rb"
require "#{File.dirname(__FILE__)}/../../lib/handsoap/compiler.rb"
+require 'pathname'
# TODO
# options:
@@ -75,11 +76,7 @@ module Create
def file_contents(relative_destination, &block)
destination = destination_path(relative_destination)
temp_file = Tempfile.new("handsoap_generator")
- if RUBY_PLATFORM =~ /linux/
- canonical_path = `readlink -fn '#{source_path("/.")}'`
- else
- canonical_path = File.expand_path(source_path("/."))
- end
+ canonical_path = Pathname.new(source_path("/.")).realpath.to_s
temp_file_relative_path = relative_path(temp_file.path, canonical_path)
begin
yield temp_file
Please sign in to comment.
Something went wrong with that request. Please try again.