mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-19 05:37:51 +00:00
Fix --type option taking no effect in app create
This commit is contained in:
parent
b6ebd0631a
commit
ad68dcf692
@ -36,7 +36,9 @@
|
||||
if (hasApplication) {
|
||||
throw new Error('You already have an application with that name!');
|
||||
}
|
||||
}).then(patterns.selectDeviceType).then(function(deviceType) {
|
||||
}).then(function() {
|
||||
return options.type || patterns.selectDeviceType();
|
||||
}).then(function(deviceType) {
|
||||
return resin.models.application.create(params.name, deviceType);
|
||||
}).then(function(application) {
|
||||
console.info("Application created: " + application.app_name + " (" + application.device_type + ", id " + application.id + ")");
|
||||
|
@ -44,7 +44,9 @@ exports.create =
|
||||
if hasApplication
|
||||
throw new Error('You already have an application with that name!')
|
||||
|
||||
.then(patterns.selectDeviceType).then (deviceType) ->
|
||||
.then ->
|
||||
return options.type or patterns.selectDeviceType()
|
||||
.then (deviceType) ->
|
||||
return resin.models.application.create(params.name, deviceType)
|
||||
.then (application) ->
|
||||
console.info("Application created: #{application.app_name} (#{application.device_type}, id #{application.id})")
|
||||
|
Loading…
Reference in New Issue
Block a user