Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

t2 restart <file> --type=flash|ram, defaults to "ram". Fixes gh-264 #265

Merged
merged 4 commits into from Aug 29, 2015

Conversation

rwaldron
Copy link
Contributor

No description provided.

default: 'ram',
help: 'Specify where in memory the script is located: `--type=flash` (push) or `--type=ram` (run)'
})
.help('Restart a script in RAM or Flash memory. (Does not rebundle)');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might add 'Restart a previously deploy script in RAM...'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in next commit

@johnnyman727
Copy link
Contributor

@rwaldron It seems like you shouldn't be specifying an entry point. To me, it's most intuitive to just run

t2 restart

or

t2 restart --push

When would you want to restart a script that wasn't the one that you just deployed?

@rwaldron
Copy link
Contributor Author

@johnnyman727

rwaldron at new-host-2 in ~/robotz/tessel-gps-monitor
$ t2 restart  index.js
INFO Connecting to Tessel...
INFO Connected to bishop over LAN
WARN "index.js" not found on bishop

@rwaldron
Copy link
Contributor Author

When would you want to restart a script that wasn't the one that you just deployed?

There is no memory from one cli call to the next, so the name of the file that the user wants to restart is not concretely knowable. There could be several files in the root of a project directory that get deployed on either a run or push— it's impossible to know which one the user wants to restart, I can imagine deploying different versions in one t2 run ... and then restarting from one or the other. It would be super messy to look at all files in the remote directory and try to figure out which is the one to restart. What we can do, is allow t2 restart and let it read the local package.json for a main entry; if the user needs to be explicit, they can be. This will cover the both of the most common cases.

@johnnyman727
Copy link
Contributor

Love it! Tried it out and it works great. Feel free to merge!

rwaldron added a commit that referenced this pull request Aug 29, 2015
t2 restart <file> --type=flash|ram, defaults to "ram". Fixes gh-264
@rwaldron rwaldron merged commit 997c2b2 into tessel:master Aug 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants