Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

🏁 refactor registry and PoSH out of squirrel-update - #11639

Merged
damieng merged 4 commits into
atom:masterfrom
BrainCrumbz:squirrel-refactor-pieces
May 4, 2016
Merged

damieng merged 4 commits into
atom:masterfrom
BrainCrumbz:squirrel-refactor-pieces

Conversation

@BrainCrumbz

Copy link
Copy Markdown
Contributor

The first aim is to extract Windows Registry and PowerShell operations from squirrel-update: having those has dependencies, it is easier to mock them and thus squirell-update tests are simplified.

In perspective, this PR is functional to further changes addressing issue #5901. Here's why:

The need for such PR arose from another currently open one, #8780 , which combines together a refactoring and a feature improvement related to Windows right-click menu. If this current PR gets merged, then #8780 would be basically superseded, hence closed, and the actual feature improvement could be discussed and brought forward separately.

As things are now, the refactoring part in #8780 needs manual updates and conflict resolution everytime the codebase moves further in the squirrel-update area. By accepting this current PR, that would be set aside once for all.

HTH

@winstliu

Copy link
Copy Markdown
Contributor

/cc @damieng @kevinsawicki @paulcbetts

@damieng damieng added the windows Issues that occur on Windows but not on other platforms. label Apr 28, 2016
@BrainCrumbz

BrainCrumbz commented Apr 28, 2016 •

Copy link
Copy Markdown
Contributor Author

Doh! A lint error landed in PR.... going to fix that shortly

@BrainCrumbz

Copy link
Copy Markdown
Contributor Author

Now the last build on Travis, the packages one on Mac, fails ... but on a first look it does not seem related to current PR changes.

Anyone taking some time to check this?

@damieng

damieng commented Apr 29, 2016

Copy link
Copy Markdown
Contributor

@BrainCrumbz I'll try and take a look over the weekend. We want to be able to enable/disable shell integration from settings so this would definitely help!

callback?(error, stdout)
# This is necessary if using Powershell 2 on Windows 7 to get the events to raise
# http://stackoverflow.com/questions/9155289/calling-powershell-from-nodejs
spawnedProcess.stdin.end()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Would it be possible to use buffered-process for this? It already takes care of spawning commands and capturing output and it would seem redundant to have two. It doesn't yet do that PowerShell workaround but that could be something to add there.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I just gave a first look at buffered-process now, of course there are similarities. Given that this PR is the first step in extracting things out of squirrel-update, and that it is propaedeutic to other long postponed changes, I'd say to split things first and then improve them further. For another pending PR we have, merging such refactoring on every codebase advance was a pita.

@damieng damieng self-assigned this May 4, 2016
@damieng

damieng commented May 4, 2016

Copy link
Copy Markdown
Contributor

I tested this on Windows 10 and it gets my 👍

@damieng
damieng merged commit 4da23fd into atom:master May 4, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

windows Issues that occur on Windows but not on other platforms.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants