pwmckenna / node-travis-encrypt

node module to encrypt environment variables for travis-ci
npmjs.org/package/travis-encrypt
46 stars 12 forks source link

encrypt only the value if key is an empty string #2

Closed kaizhu256 closed 10 years ago

kaizhu256 commented 10 years ago

this pull request only modifies one line in your code to change the behavior if key is an empty string

$ ## example usage with empty key string
$ travis-encrypt -r kaizhu256/utility2 -k "" -v "heroku_api_key_secret"
# undefined
+UOJknUje0te1+54BFtDQi+1jFBTDfFI7qYSV+tcDMkCeQJ7K/lh4y45c8w+I/OE0BL7eyL1MowiMf5oQnSlDg==