From 1f1a44ec19d159b1a2f7cfc8bf7760b946d73d9b Mon Sep 17 00:00:00 2001 From: Dan Bauer Date: Thu, 1 Oct 2015 18:01:05 -0700 Subject: [PATCH] Added correction re: npm bin --- _posts/00-08-04-postgres-psql.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/_posts/00-08-04-postgres-psql.md b/_posts/00-08-04-postgres-psql.md index 5b56a56..3c06dd4 100644 --- a/_posts/00-08-04-postgres-psql.md +++ b/_posts/00-08-04-postgres-psql.md @@ -90,6 +90,12 @@ Let's specify the creation of tables and relationships directly in JavaScript. T That command is a short way of saying `./node_modules/.bin/knex init` but it works from any directory. + +Beware of directories with spaces in their name; the path replacement won't work if the path it returns contains a space. +If that happens, you can glue the whole path together by wrapping it in quotes like this: +{% highlight bash %} +"`npm bin`"/knex init +{% endhighlight %} Then modify the `knexfile.js` file so that the `development` section contains: