hokaccha / nodebrew

Node.js version manager
MIT License
1.06k stars 66 forks source link

Fix migrate-package #37

Closed kysnm closed 9 years ago

kysnm commented 9 years ago
/tmp/nodebrew% perl -de 1

Loading DB routines from perl5db.pl version 1.33
Editor support available.

Enter h or `h h' for help, or `man perldebug' for more help.

main::(-e:1):   1
  DB<1> $current_version = 'io@v2.3.0'

  DB<2> p $current_version
io@v2.3.0
  DB<3> $is_iojs = $current_version =~ s/^io@//

  DB<4> p $is_iojs
1
  DB<5> p ($current_version =~ $is_iojs)

  DB<6> p ($current_version =~ $is_iojs ? 'iojs' : 'node')
node
  DB<7> p ('v2.1.0' =~ $is_iojs ? 'iojs' : 'node')
iojs
  DB<8>

results of $current_version =~ $is_iojs will become to false If it does not include 1 to $current_version So, I remove $current_version =~

Is this patch correct?

hokaccha commented 9 years ago

released v0.8.2. Thanks!

kysnm commented 9 years ago

My pleasure!