-
Notifications
You must be signed in to change notification settings - Fork 13
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
[Setup] Config generation fails on Windows #50
Comments
Adding quotes and running through PowerShell resolves the issue:
This is sufficient to set up a Windows development environment. Ideally, this could be incorporated into the
Unfortunately, when this command is run indirectly through npm (as opposed to directly through PowerShell), a new error occurs. It says: It seems that subcommands are not evaluated properly when running through npm. I'm going to continue to look into this, but at least there is now an option for developing on Windows. |
I figured out the problem. It turns out that npm creates a new shell for every run, and the default shell for windows happens to be cmd.exe (command prompt). This shell does not support the subexpression syntax used in the
Solution 1 is good because it will work on any Windows machine without additional configuration. However, it means that setup instructions will be different depending on the platform, which could complicate things unnecessarily. Solution 2 seems more elegant because, from the user's perspective, the setup process has not changed at all (except for the fact that it works). The only negative to solution 2 is that it assumes that the user has bash installed somewhere on their path. However, I think this is a reasonable assumption since it ships with Git for WIndows, and Git is a prerequisite for acquiring the repository. I am going to open a PR with solution 2 for now. I still need to verify that the addition of the |
It turns out that changing the shell to bash does not work because It says: I am not sure how to resolve this at the moment, but I will look into it later. |
The one thing I was looking at is doing the "docker pull" command from within a docker container (henceforth dockerizing the application). That should ideally prevent any of the cross-platform crashes, but getting it to work has been troublesome to say the least. |
Subject of the issue
Running
npm run generate-config
produces the error messageunknown shorthand flag: 'g' in -g
on WindowsExpected behaviour
The file config/default.yml is generated
Actual behaviour
An error occurs
Steps to reproduce
Clone the repository and run the setup instructions on a windows machine
Any relevant logs, error output, etc?
unknown shorthand flag: 'g' in -g
The text was updated successfully, but these errors were encountered: