mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-23 15:32:22 +00:00
Fix resin preload when a commit is provided.
Connects-To #629 Change-Type: patch
This commit is contained in:
parent
224dfce4a8
commit
999f269e36
@ -188,7 +188,9 @@ module.exports = {
|
||||
}
|
||||
return Promise["try"](function() {
|
||||
if (options.commit) {
|
||||
if (_.map(builds, 'commit_hash').indexOf(options.commit) === -1) {
|
||||
if (!_.find(application.build, {
|
||||
commit_hash: options.commit
|
||||
})) {
|
||||
expectedError('There is no build matching this commit');
|
||||
}
|
||||
return options.commit;
|
||||
|
@ -196,7 +196,7 @@ module.exports =
|
||||
# Use the commit given as --commit or show an interactive commit selection menu
|
||||
Promise.try ->
|
||||
if options.commit
|
||||
if _.map(builds, 'commit_hash').indexOf(options.commit) == -1
|
||||
if not _.find(application.build, commit_hash: options.commit)
|
||||
expectedError('There is no build matching this commit')
|
||||
return options.commit
|
||||
selectApplicationCommit(expectedError, resin, form, application.build)
|
||||
|
Loading…
Reference in New Issue
Block a user