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

Pop open the terminal and run UCM if we dont find it #7

Merged
merged 9 commits into from
Nov 7, 2022

Conversation

tapegram
Copy link
Contributor

@tapegram tapegram commented Nov 3, 2022

Partial implementation of #6

This PR will automatically open the embedded terminal and try to run UCM if we weren't able to find a running process to connect to.

We will only try this 1 time to avoid shenanigans or needing to worry about accidentally getting stuck in weird loops.

This makes no attempt to address the problem if UCM isn't installed at all. Hopefully, this will make it a little clearer that maybe UCM is not on the PATH? It might be nice in the future to show a nice message with a link to installation instructions.

This behavior can be disabled via a configuration (unison.automaticallyOpenUCM)

Video examples

Happy path + quitting UCM doesn't result in the extension starting it again

Screen.Recording.2022-11-03.at.6.27.29.PM.mov

"Simulating" UCM not being on the PATH

Screen.Recording.2022-11-03.at.6.28.11.PM.mov

@@ -1,1646 +1,8 @@
{
Copy link
Contributor Author

@tapegram tapegram Nov 4, 2022

Choose a reason for hiding this comment

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

I don't really know what's going on in here. I think I have an older version of npm installed so it set the lockfile version back when i did npm install. Not sure why the packages changed though. LMK if I should revert the changes to this file or something.

Copy link
Contributor

@ChrisPenner ChrisPenner left a comment

Choose a reason for hiding this comment

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

Thanks, this is great!

I made a small tweak to change when messages pop up,
and also added a ucmCommand config parameter since I expect the development team will appreciate it.

I'll publish the new version ASAP 👍🏼

@ChrisPenner ChrisPenner merged commit 43d4459 into unisonweb:main Nov 7, 2022
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.

2 participants