Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Stops yeoman from looking for win32 binaries in ../vendor/ #519

Merged
merged 1 commit into from Oct 10, 2012

Conversation

Projects
None yet
4 participants
Member

kevva commented Sep 20, 2012

This fixes an issue where Yeoman searches for optipng.exe and jpegtran.exe in ../vendor/ on Windows. Since those files aren't there anymore this will render an error when you are running build.

This commit will treat Windows like any other system and search for the libraries in PATH instead.

Owner

sindresorhus commented Sep 20, 2012

Have you tested that this actually works on Windows?

Member

kevva commented Sep 20, 2012

Yes, this works, provided that you have optipng and jpegtran in PATH.

b-long commented Oct 1, 2012

@sindresorhus Any thoughts on this ? ( #485 )

@sindresorhus sindresorhus added a commit that referenced this pull request Oct 10, 2012

@sindresorhus sindresorhus Merge pull request #519 from kevva/windows-img
Stops yeoman from looking for win32 binaries in ../vendor/
b1ca678

@sindresorhus sindresorhus merged commit b1ca678 into yeoman:master Oct 10, 2012

@sleeper sleeper referenced this pull request Oct 10, 2012

Closed

Tests are not passing #600

@sindresorhus sindresorhus added a commit that referenced this pull request Oct 10, 2012

@sindresorhus sindresorhus Fix #519 breaking build on OS X d1ed27e
Contributor

sleeper commented Oct 10, 2012

I was just creating the same ;)

Seems like the logic has changed and potentially some part were left off ...
Before the merge:

   if ( !win32 || !/optipng|jpegtran/.test( cmd ) ) {
      return which( cmd, cb );
    }
    var cmdpath = cmd === 'optipng' ? '../vendor/optipng-0.7.1-win32/optipng.exe' :
      '../vendor/jpegtran-8d/jpegtran.exe';
    cb(null, path.join(__dirname, cmdpath));

after the merge:

    if ( win32 || !/optipng|jpegtran/.test( cmd ) ) {
      return which( cmd, cb );
    }

e.g.:

  • Before the merge the which was called if we were not running windows, or (in case we ran windows) if the command was neither optipng nor jpegtran
  • After the merge, it is called if we're running on windows or if the command is not optipng or jpegtran

So logic wise this is almost the contrary (i.e. in my case, on OSX, in the "before" version which was always called, no it is called only if the command is not optipng nor jpegtran).

Member

kevva commented Oct 10, 2012

Hey guys, sorry for the inconvenience. Didn't have a chance to test this on OS X. I can confirm that d1ed27e works on Windows though.

@szinya szinya pushed a commit to menthainternet/yeoman that referenced this pull request Sep 17, 2014

@sindresorhus sindresorhus Merge pull request #519 from kevva/windows-img
Stops yeoman from looking for win32 binaries in ../vendor/
1b07249

@szinya szinya pushed a commit to menthainternet/yeoman that referenced this pull request Sep 17, 2014

@sindresorhus sindresorhus Fix #519 breaking build on OS X b21f8a1

@sindresorhus sindresorhus added a commit that referenced this pull request Apr 24, 2015

@sindresorhus sindresorhus Merge pull request #519 from kevva/windows-img
Stops yeoman from looking for win32 binaries in ../vendor/
c36af99

@sindresorhus sindresorhus added a commit that referenced this pull request Apr 24, 2015

@sindresorhus sindresorhus Fix #519 breaking build on OS X 0c4a8d5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment