var app = require('app');
+var dialog = require('dialog');
var path = require('path');
var optimist = require('optimist');
require(path.resolve(argv._[0]));
} catch(e) {
if (e.code == 'MODULE_NOT_FOUND') {
- console.error(e.stack);
- console.error('Specified app is invalid');
+ app.focus();
+ dialog.showMessageBox({
+ type: 'warning',
+ buttons: ['OK'],
+ title: 'Error opening app',
+ message: 'The app provided is not a valid atom-shell app, please read the docs on how to write one:',
+ detail: 'https://github.com/atom/atom-shell/tree/master/docs'
+ });
process.exit(1);
} else {
throw e;