[rubygems/rubygems] normalise manifest path from cargo on windows
https://github.com/rubygems/rubygems/commit/23b5ca5fc4
This commit is contained in:
parent
c5a34f5b56
commit
cb06006213
@ -224,7 +224,7 @@ class Gem::Ext::CargoBuilder < Gem::Ext::Builder
|
|||||||
# --format-version 1 option the output is compatible with YAML, so we can
|
# --format-version 1 option the output is compatible with YAML, so we can
|
||||||
# avoid the json dependency
|
# avoid the json dependency
|
||||||
metadata = Gem::SafeYAML.safe_load(output)
|
metadata = Gem::SafeYAML.safe_load(output)
|
||||||
package = metadata["packages"].find {|pkg| pkg["manifest_path"] == manifest_path }
|
package = metadata["packages"].find {|pkg| normalize_path(pkg["manifest_path"]) == manifest_path }
|
||||||
unless package
|
unless package
|
||||||
found = metadata["packages"].map {|md| "#{md["name"]} at #{md["manifest_path"]}" }
|
found = metadata["packages"].map {|md| "#{md["name"]} at #{md["manifest_path"]}" }
|
||||||
raise Gem::InstallError, <<-EOF
|
raise Gem::InstallError, <<-EOF
|
||||||
@ -239,6 +239,12 @@ EOF
|
|||||||
package["name"].tr("-", "_")
|
package["name"].tr("-", "_")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def normalize_path(path)
|
||||||
|
return path unless File::ALT_SEPARATOR
|
||||||
|
|
||||||
|
path.tr(File::ALT_SEPARATOR, File::SEPARATOR)
|
||||||
|
end
|
||||||
|
|
||||||
def rustc_dynamic_linker_flags(dest_dir, crate_name)
|
def rustc_dynamic_linker_flags(dest_dir, crate_name)
|
||||||
split_flags("DLDFLAGS")
|
split_flags("DLDFLAGS")
|
||||||
.map {|arg| maybe_resolve_ldflag_variable(arg, dest_dir, crate_name) }
|
.map {|arg| maybe_resolve_ldflag_variable(arg, dest_dir, crate_name) }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user