Skip to content

Commit

Permalink
Only convert to UNC path when enabled via env var
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisroberts committed Jun 16, 2018
1 parent c15d64c commit 354f602
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/batali/utility.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ class Utility < Grimoire::Utility
# on platform in use
def self.clean_path(path)
path = File.expand_path(path.to_s)
if RUBY_PLATFORM =~ /mswin|mingw|windows/ && path.downcase.match(/^[a-z]:/)
if RUBY_PLATFORM =~ /mswin|mingw|windows/ && path.downcase.match(/^[a-z]:/) &&
ENV["BATALI_ENABLE_UNC"]
path = path.tr("/", '\\')
path = UNC_PREFIX + path
end
Expand Down

0 comments on commit 354f602

Please sign in to comment.