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

feature request(platform): Windows support #5

Open
Kristinita opened this issue Mar 2, 2024 · 3 comments
Open

feature request(platform): Windows support #5

Kristinita opened this issue Mar 2, 2024 · 3 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@Kristinita
Copy link

1. Summary

See the header. Currently, the package doesn’t install on Windows:

D:\SashaDemoRepositories\SashaFd>npm install --global fd-find
npm ERR! code 1
npm ERR! path C:\Users\SashaChernykh\AppData\Roaming\npm\node_modules\fd-find
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node download.js
npm ERR! Platform 'win32' is not yet supported by this tool. Feel free to open an issue on https://github.com/pablopunk/fd-find/issues

Windows users are people too 😄.

2. Reasons for desirability of adding a feature

I’m creating a cross-platform project. I’m requesting Windows support for this package while Windows users can download the fd via Chocolatey/Scoop/Winget, for two reasons:

  1. Easy consistent cross-platform installation of the latest fd version. One command npm install --save-dev fd-find for all platforms will eliminate additional installation problems. Currently, I can’t add fd-find to package.json because the project then doesn’t work on Windows.
  2. No extra dependencies. Installing a big dependency Chocolatey/Scoop/Winget for continuous integration solely to install fd can be time-consuming.
  3. Cache. Additional reason. Possible that re-installing fd on Windows via npm will faster than installing via Chocolatey, because it’s easy to set up a cache to install npm packages. Caching Chocolatey packages isn’t easy.

Thanks.

@pablopunk
Copy link
Owner

Windows users are people too 😄.

Are you sure??... Just kidding, I use Windows too.

Unfortunately it's not as easy as adding one more case here. It works fine for mac/linux cause they work with standard UNIX tools that I use to download and manage the fd binary. Windows would require a whole different set of actions.

I don't think I'll find the time to work on this and test it on windows but I'm open to PRs if you wanna give it a go, shouldn't be too hard.

@pablopunk pablopunk added help wanted Extra attention is needed good first issue Good for newcomers labels Mar 11, 2024
@Kristinita
Copy link
Author

Kristinita commented Mar 11, 2024

It works fine for mac/linux cause they work with standard UNIX tools that I use to download and manage the fd binary. Windows would require a whole different set of actions.

1. UNIX tools

Type: Reply 💬

Git for Windows has all these UNIX CLI tools except wget. In 2024, Git is a standard and a very popular tool for developers, and I don’t think installing Git will be a problem for most Windows users who need fd-find.

2. Wget

Type: Question

As for Wget, a Windows version also exists, but Windows users must install it separately. I don’t use Wget on Windows and I would prefer that Windows users were not required to install this dependency. I see that Node fd-find is already using default Node.js HTTPS module. Is Wget required for this package and cannot be replaced by some default behavior of Node.js?

Thanks.

@pablopunk
Copy link
Owner

Git for Windows has all these UNIX CLI tools except wget

but I'm executing them directly with spawnSync(), not sure if that would work with git's commands. Wget is not necessary, it's what I'm using to download the file, but it could either be curl or fetch with NodeJS.

as I said it shouldn't be hard, I just can't find the time to do this now, as I'm not gonna use it. If you wanna try it, I'll review a PR ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants