lib/vagrant/util/platform.rb
# This takes any path and converts it from a Windows path to a
# Cygwin or msys style path.
#
# @param [String] path
# @return [String]
This takes any path and converts it from a Windows path to a
Cygwin or msys style path.
This takes any path and converts it from a Windows path to a Cygwin or msys style path .
def cygwin_path(path)
          begin
            process = Subprocess.execute("cygpath", "-u", "-a", path.to_s)
            return process.stdout.chomp
          rescue Errors::CommandUnavailableWindows
            process = Subprocess.execute(
              "bash",
              "--noprofile",
              "--norc",
              "-c", "cd #{path} && pwd")
            return process.stdout.chomp
          end
        end
def cygwin_path ( path ) begin process = Subprocess . execute ( "cygpath" , "-u" , "-a" , path . to_s ) return process . stdout . chomp rescue Errors :: CommandUnavailableWindows process = Subprocess . execute ( "bash" , "--noprofile" , "--norc" , "-c" , "cd #{path} && pwd" ) return process . stdout . chomp end end
This takes any path and converts it from a Windows path to a
Cygwin or msys style path.
This takes any path and converts it from a Windows path to a Cygwin or msys style path .
# First try the real cygpath # Sometimes cygpath isn't available (msys). Instead, do what we # can with bash tricks.
None
String
path
<not_specific>
<not_specific>
None