m19c / gulp-run

Pipe to shell commands in gulp
ISC License
151 stars 25 forks source link

revert missing variable #11

Closed lichunqiang closed 10 years ago

lichunqiang commented 10 years ago

I'm sorry for my careless. :cry:

lichunqiang commented 10 years ago

@cbarrick See official doc http://nodejs.org/api/process.html#process_process_platform

What platform you're running on: 'darwin', 'freebsd', 'linux', 'sunos' or 'win32'

So if windows, process.platform will always return win32

cbarrick commented 10 years ago

I recently switched to using lastIndexOf instead of regexp. Assuming string comparison uses strcmp and lastIndexOf uses Boyer-Moore then both should be equal in terms of performance, and lastIndexOf has the benefit of being slightly more resilient if another Windows platform is ever introduced.