Skip to content

Commit

Permalink
startup-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
TakenPilot committed Dec 16, 2016
1 parent 27db7b0 commit a3cc11b
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 7 deletions.
7 changes: 4 additions & 3 deletions contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ You need the following to run Rodeo in dev mode:
Then from the root directory of the project:
```bash
npm install # to install the dependences
gulp build # to build the project
npm run build # to build the project
npm start # to run Rodeo
```

## To run the project with hot-swapping modules
```bash
npm install # to install the dependences
gulp # to build the project
gulp hot # to opt-in to hot-swapping modules
npm run build # to build the project
npm run build:browser-dev # to opt-in to hot-swapping modules
npm start # to run Rodeo
```
and then in another console
Expand Down Expand Up @@ -48,6 +48,7 @@ brew install Caskroom/cask/xquartz wine mono
# so we can build linux on mac
brew install gnu-tar libicns graphicsmagick
```

Then:
```bash
CSC_NAME=<some key sha identifier for signing> npm run dist:all
Expand Down
7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@
"target": [
"dmg",
"zip"
],
"extraResources": [
{
"from": ".tmp/osx/conda/",
"to": "conda",
"filter": "**/*"
}
]
}
},
Expand Down
7 changes: 4 additions & 3 deletions src/browser/services/ipc-dispatcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,12 @@ function otherDispatcher(dispatch) {

if (isDefaultPythonCmd && useBuiltinPython === 'failover' && !hasPythonFailedOver) {
console.warn('Using built-in python.');
session.set('hasPythonFailedOver', new Date().getTime());
session.set('hasPythonFailedOver', {time: new Date().getTime(), clientId});
// local.set('kernelName', 'rodeo-builtin-miniconda');
local.set('restartKernelOnCloseProcess', true);
} else {
// they have to fix it
} else if (hasPythonFailedOver && hasPythonFailedOver.clientId !== clientId) {
// if this is the second time we've failed over
session.set('hasPythonFailedOver', false);
dispatch(applicationActions.showStartupWindow());
}
}
Expand Down
6 changes: 6 additions & 0 deletions src/node/kernels/python/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import cuid from 'cuid/dist/node-cuid';
import errorClone from '../../services/clone';
import EventEmitter from 'events';
import files from '../../services/files';
import fs from 'fs';
import listenScript from './listen.py';
import patch from './patch.py';
import path from 'path';
Expand Down Expand Up @@ -557,6 +558,11 @@ function resolveHomeDirectoryOptions(options) {

if (options.cwd) {
options.cwd = files.resolveHomeDirectory(options.cwd);

// guarantee that current working directory exists
if (!fs.existsSync(options.cwd)) {
options.cwd = files.resolveHomeDirectory('~');
}
}
}

Expand Down
1 change: 0 additions & 1 deletion src/shared/env.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import _ from 'lodash';
import fs from 'fs';

export function splitList(list) {
if (process.platform === 'win32') {
Expand Down

0 comments on commit a3cc11b

Please sign in to comment.