Skip to content
This repository has been archived by the owner on Mar 19, 2022. It is now read-only.

Replaced eval with const_get method #467

Merged
merged 1 commit into from
Jan 1, 2016
Merged

Replaced eval with const_get method #467

merged 1 commit into from
Jan 1, 2016

Conversation

szemek
Copy link
Contributor

@szemek szemek commented Dec 31, 2015

Hello @matschaffer
when I was running knife-solo on one of servers I received following error:

Bootstrapping Chef...
ERROR: SyntaxError: (eval):1: syntax error, unexpected ':', expecting end-of-input
...Solo::Bootstraps::bash:warning:setlocale:LC_ALL:cannotchange...
...                               ^

I started debugging and found interesting place. In my opinion eval is not necessary and const_get is sufficient, and what's more, const_get helps to spot an issue way faster.

Bootstrapping Chef...
ERROR: KnifeSolo::Bootstraps::OperatingSystemNotImplementedError: "bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)\r\nLinux" not implemented.  Feel free to add a bootstrap implementation in KnifeSolo::Bootstraps::bash:warning:setlocale:LC_ALL:cannotchangelocale(en_US.UTF-8)Linux

Happy New Year 🎉
@szemek

matschaffer added a commit that referenced this pull request Jan 1, 2016
Replaced eval with const_get method
@matschaffer matschaffer merged commit 01508ab into matschaffer:master Jan 1, 2016
@matschaffer matschaffer removed the ready label Jan 1, 2016
@matschaffer
Copy link
Owner

Thanks! You win first-merge of 2016 prize (at least from my time zone anyway)

@szemek szemek deleted the eval-bootstraps branch January 1, 2016 08:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants