mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-18 21:27:51 +00:00
log unhandled exceptions
This commit is contained in:
parent
75d10286ad
commit
225d3acf9e
@ -3,6 +3,10 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
### Fixed
|
||||
|
||||
- Capture and report errors happening during the program initialization, like parsing invalid YAML config
|
||||
|
||||
## [5.7.2] - 2017-04-18
|
||||
|
||||
### Fixed
|
||||
|
@ -53,12 +53,12 @@ module.exports = {
|
||||
}
|
||||
],
|
||||
action: function(params, options, done) {
|
||||
var Promise, child_process, patterns, resin, settings, verbose;
|
||||
var Promise, child_process, patterns, proxyUrl, resin, verbose;
|
||||
child_process = require('child_process');
|
||||
Promise = require('bluebird');
|
||||
resin = require('resin-sdk-preconfigured');
|
||||
settings = require('resin-settings-client');
|
||||
patterns = require('../utils/patterns');
|
||||
proxyUrl = resin.settings.get('proxyUrl');
|
||||
if (options.port == null) {
|
||||
options.port = 22;
|
||||
}
|
||||
@ -92,7 +92,7 @@ module.exports = {
|
||||
}
|
||||
return Promise["try"](function() {
|
||||
var command, subShellCommand;
|
||||
command = "ssh " + verbose + " -t -o LogLevel=ERROR -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ControlMaster=no -p " + options.port + " " + username + "@ssh." + (settings.get('proxyUrl')) + " enter " + uuid + " " + containerId;
|
||||
command = "ssh " + verbose + " -t -o LogLevel=ERROR -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ControlMaster=no -p " + options.port + " " + username + "@ssh." + proxyUrl + " enter " + uuid + " " + containerId;
|
||||
subShellCommand = getSubShellCommand(command);
|
||||
return child_process.spawn(subShellCommand.program, subShellCommand.args, {
|
||||
stdio: 'inherit'
|
||||
|
@ -24,7 +24,10 @@ Raven.disableConsoleAlerts();
|
||||
Raven.config(require('./config').sentryDsn, {
|
||||
captureUnhandledRejections: true,
|
||||
release: require('../package.json').version
|
||||
}).install();
|
||||
}).install(function(logged, error) {
|
||||
console.error(error);
|
||||
return process.exit(1);
|
||||
});
|
||||
|
||||
_ = require('lodash');
|
||||
|
||||
|
@ -70,8 +70,8 @@ module.exports =
|
||||
child_process = require('child_process')
|
||||
Promise = require 'bluebird'
|
||||
resin = require('resin-sdk-preconfigured')
|
||||
settings = require('resin-settings-client')
|
||||
patterns = require('../utils/patterns')
|
||||
proxyUrl = resin.settings.get('proxyUrl')
|
||||
|
||||
if not options.port?
|
||||
options.port = 22
|
||||
@ -92,7 +92,8 @@ module.exports =
|
||||
|
||||
Promise.props
|
||||
username: resin.auth.whoami()
|
||||
uuid: device.uuid # get full uuid
|
||||
uuid: device.uuid
|
||||
# get full uuid
|
||||
containerId: resin.models.device.getApplicationInfo(device.uuid).get('containerId')
|
||||
.then ({ username, uuid, containerId }) ->
|
||||
throw new Error('Did not find running application container') if not containerId?
|
||||
@ -102,7 +103,7 @@ module.exports =
|
||||
-o StrictHostKeyChecking=no \
|
||||
-o UserKnownHostsFile=/dev/null \
|
||||
-o ControlMaster=no \
|
||||
-p #{options.port} #{username}@ssh.#{settings.get('proxyUrl')} enter #{uuid} #{containerId}"
|
||||
-p #{options.port} #{username}@ssh.#{proxyUrl} enter #{uuid} #{containerId}"
|
||||
|
||||
subShellCommand = getSubShellCommand(command)
|
||||
child_process.spawn subShellCommand.program, subShellCommand.args,
|
||||
|
@ -16,11 +16,12 @@ limitations under the License.
|
||||
|
||||
Raven = require('raven')
|
||||
Raven.disableConsoleAlerts()
|
||||
Raven.config(
|
||||
require('./config').sentryDsn
|
||||
Raven.config require('./config').sentryDsn,
|
||||
captureUnhandledRejections: true
|
||||
release: require('../package.json').version
|
||||
).install()
|
||||
.install (logged, error) ->
|
||||
console.error(error)
|
||||
process.exit(1)
|
||||
|
||||
_ = require('lodash')
|
||||
Promise = require('bluebird')
|
||||
|
@ -44,7 +44,6 @@
|
||||
"etcher-image-write": "^9.0.3",
|
||||
"inquirer": "^3.0.6",
|
||||
"is-root": "^1.0.0",
|
||||
"js-yaml": "^3.7.0",
|
||||
"lodash": "^3.10.0",
|
||||
"mixpanel": "^0.4.0",
|
||||
"moment": "^2.12.0",
|
||||
@ -63,7 +62,6 @@
|
||||
"resin-image-fs": "^2.1.2",
|
||||
"resin-image-manager": "^4.1.1",
|
||||
"resin-sdk-preconfigured": "^6.0.0",
|
||||
"resin-settings-client": "^3.5.0",
|
||||
"resin-sync": "^7.0.0",
|
||||
"rimraf": "^2.4.3",
|
||||
"rindle": "^1.0.0",
|
||||
|
Loading…
Reference in New Issue
Block a user