Skip to content

Commit

Permalink
Fixed a typo in the readmem, updated the generatorPath and corrected …
Browse files Browse the repository at this point in the history
…exit statement in the install file

In the latest releases the yeoman developer changed the paths to the
generators slightly. Also, os.exit() was causing an error if the
directory wasn't found, changed to use the sys library instead.
  • Loading branch information
Brian Hall committed Feb 26, 2013
1 parent 1eaab86 commit 6befa94
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions install.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
import os
import shutil
import sys

# Script to install the generator.
# I am a novice in python so it's certainly not perfect. If you know a way to improve it, feel free to fork it

generatorPath = '/usr/local/lib/node_modules/yeoman/node_modules/yeoman-generators/lib/generators'
generatorPath = '/usr/local/lib/node_modules/yo/node_modules/yeoman-generator/lib/generators'
currentDir = os.path.dirname(os.path.abspath(__file__))
yeomanLiquidPath = os.path.join(generatorPath, 'liquid')

print generatorPath
print currentDir
print yeomanLiquidPath

# Check if Yeoman is installed
if not os.path.isdir(generatorPath):
print 'It seems that Yeoman is not installed.'
print 'If you have trouble installing the generator please refer to the install instructions in the Readme.'
os.exit()
sys.exit()

# if the generator is already installed we remove it to avoid errors
if os.path.isdir(yeomanLiquidPath):
Expand All @@ -23,4 +28,4 @@
except :
print 'Oops, something went wrong, sorry'
print 'If you have trouble installing the generator please refer to the install install instructions in the Readme.'
raise
raise
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ You may need to re-install the generator every time you update Yeoman.
If the install script failed, here is how to install it manually:

`cd /usr/local/lib/node_modules/yeoman/node_modules/yeoman-generators/lib/generators`
`git clone git://github.com/romainberger/yeoman-wordpress.git` (you may need to run this with `sudo`)
`git://github.com/TastyToast/generator-liquid-master.git` (you may need to run this with `sudo`)

###Uninstalling

Expand Down

0 comments on commit 6befa94

Please sign in to comment.