mirror of https://github.com/tildeio/helix
Use cargo metadata to determine the target directory
The command otherwise failed when used with cargo workspaces
This commit is contained in:
parent
f148ac0d62
commit
6733f74b0d
|
@ -1,4 +1,5 @@
|
|||
require 'tomlrb'
|
||||
require 'json'
|
||||
|
||||
module HelixRuntime
|
||||
class Project
|
||||
|
@ -33,7 +34,9 @@ module HelixRuntime
|
|||
end
|
||||
|
||||
def build_path
|
||||
File.expand_path(debug_rust? ? 'target/debug' : 'target/release', build_root)
|
||||
metadata = %x[cargo metadata --format-version 1]
|
||||
target_directory = JSON.parse(metadata)["target_directory"]
|
||||
File.expand_path(debug_rust? ? 'debug' : 'release', target_directory)
|
||||
end
|
||||
|
||||
def lib_path
|
||||
|
|
|
@ -252,4 +252,4 @@ macro_rules! codegen_extra_impls {
|
|||
codegen_coercions!($class);
|
||||
codegen_ruby_init!($class);
|
||||
)
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue