Skip to content

Commit fb5fd2f

Browse files
authoredJan 19, 2021
(ios): add console output for simulator selection (#1036)
1 parent fb999cb commit fb5fd2f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed
 

‎bin/templates/scripts/cordova/lib/build.js

+1
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ function createProjectObject (projectPath, projectName) {
7171
* @return {Promise}
7272
*/
7373
function getDefaultSimulatorTarget () {
74+
events.emit('log', 'Select last emulator from list as default.');
7475
return require('./listEmulatorBuildTargets').run()
7576
.then(emulators => {
7677
let targetEmulator;

‎bin/templates/scripts/cordova/lib/listEmulatorBuildTargets.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
under the License.
1818
*/
1919

20-
const { superspawn: { spawn } } = require('cordova-common');
20+
const { superspawn: { spawn }, events } = require('cordova-common');
2121

2222
/**
2323
* Returns a list of available simulator build targets of the form
@@ -31,7 +31,8 @@ const { superspawn: { spawn } } = require('cordova-common');
3131
*
3232
*/
3333
function listEmulatorBuildTargets () {
34-
return spawn('xcrun', ['simctl', 'list', '--json'])
34+
events.emit('log', 'List simulator targets');
35+
return spawn('xcrun', ['simctl', 'list', '--json'], { printCommand: true })
3536
.then(output => JSON.parse(output))
3637
.then(function (simInfo) {
3738
var devices = simInfo.devices;

0 commit comments

Comments
 (0)