Merge pull request #154 from konstin/fix_workspaces

Fix cargo workspaces
This commit is contained in:
Godfrey Chan 2018-06-15 19:41:09 -04:00 committed by GitHub
commit cdbe494ecf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -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