Merge pull request #555 from resin-io/553-fix-qemu-path

Ensure emulated builds use the correct relative path to qemu
This commit is contained in:
Tim Perry 2017-06-15 12:00:58 +02:00 committed by GitHub
commit 390332cd6c
3 changed files with 6 additions and 2 deletions

View File

@ -10,6 +10,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- `package-lock.json` for `npm5` users
- Added ability to run an emulated build silently with resin build
### Fixed
- Ensure emulated builds use the correct relative path to qemu when called from any location
## [5.10.2] - 2017-05-31
### Fixed

View File

@ -183,7 +183,7 @@ exports.runBuild = function(params, options, getBundleInfo, logStreams) {
}).then(function() {
return copyQemu(params.source);
}).then(function(binPath) {
return qemuPath = binPath.split(path.sep).slice(1).join(path.sep);
return qemuPath = path.relative(params.source, binPath);
});
}).then(function() {
return tarDirectory(params.source);

View File

@ -188,7 +188,7 @@ exports.runBuild = (params, options, getBundleInfo, logStreams) ->
# Copy the qemu binary into the build context
copyQemu(params.source)
.then (binPath) ->
qemuPath = binPath.split(path.sep)[1...].join(path.sep)
qemuPath = path.relative(params.source, binPath)
.then ->
# Tar up the directory, ready for the build stream
tarDirectory(params.source)