garrensmith closed pull request #1008: Fix devserver on Windows
URL: https://github.com/apache/couchdb-fauxton/pull/1008
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/devserver.js b/devserver.js
index 98b13cba1..691d6ee40 100644
--- a/devserver.js
+++ b/devserver.js
@@ -31,8 +31,9 @@ const devSetup = function (cb) {
if (settings.noClean) {
cmd = 'devSetup';
}
-
- const grunt = spawn('grunt', [cmd]);
+ const isOnWindows = process.platform === 'win32';
+ const gruntCmd = isOnWindows ? 'grunt.cmd' : 'grunt';
+ const grunt = spawn(gruntCmd, [cmd]);
grunt.stdout.on('data', (data) => {
console.log(data.toString());
diff --git a/package.json b/package.json
index 31a4fc2df..e3c400bc8 100644
--- a/package.json
+++ b/package.json
@@ -129,7 +129,7 @@
"start-debug": "DIST=./dist/debug node ./bin/fauxton",
"preversion": "node version-check.js && grunt release",
"test-before-publish": "npm run preversion && npm install . -g",
- "create:animaldb": "./bin/create-animal-db",
+ "create:animaldb": "node ./bin/create-animal-db",
"docker:couchdb-up": "docker-compose -f ./docker/dc.selenium.yml up -d
couchdb",
"docker:selenium-up": "docker-compose -f ./docker/dc.selenium.yml up -d
selenium",
"docker:selenium-debug-up": "docker-compose -f
./docker/dc.selenium-debug.yml up -d selenium",
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services