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

feat: support for windows #5

Merged
merged 1 commit into from
Sep 3, 2018
Merged

feat: support for windows #5

merged 1 commit into from
Sep 3, 2018

Conversation

Fonger
Copy link
Contributor

@Fonger Fonger commented Aug 29, 2018

Resolves #2

  1. In windows, use powershell to download mongodb and unzip it.
    Maybe we can use builtin node.js module to download and use unzip package to keep the code clean?
  2. To maintain compatibility with Windows 7, it does not use Expand-Archive to unzip the file because it's only available since PowerShell v5 (Windows 10)
  3. mkdir -p in unix equals to mkdir or md in windows. However in Windows, mkdir an existing directory will throw error. So it checks if the path exists before creating one. (ignoring race condition)
  4. Checking for every directory is redundant so I declare ports array for primary/secondary ports.

Tested on Windows 10.

dl.js Show resolved Hide resolved
@vkarpov15 vkarpov15 merged commit f9edc95 into vkarpov15:master Sep 3, 2018
Fonger added a commit to Fonger/mongoose that referenced this pull request Sep 3, 2018
@Fonger
Copy link
Contributor Author

Fonger commented Sep 3, 2018

@vkarpov15 I forget to update README.md and remove Windows is not supported

run-rs/README.md

Lines 33 to 35 in 5e95c69

## OS Support
Run-rs supports Linux and OSX. Windows is **not** currently supported.

And for mongodb 4.1.x, it seems the filename becomes mongodb-win32-x86_64-2012plus-${version}.zip.

It's not released so I didn't handle this case. It's highly possible that when 4.2 is officially out, it will follow this new pattern.

vkarpov15 added a commit that referenced this pull request Sep 3, 2018
@vkarpov15
Copy link
Owner

@Fonger I changed the run-rs README, thanks for the reminder. Re: 4.1.x, let's not worry about that yet, 4.1 is a dev-only release, we'll figure that out once 4.2 lands.

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