2
我想設置以下內容在我的.bash_profile廚師投訴
bash_profile_content = %Q(
export EDITOR=vi
export ENV=#{role}
export PATH=$PATH:/usr/local/bin
export PS1="${debian_chroot:+($debian_chroot)}\[email protected]\h:\w [$ENV]\$ "
)
file '/home/me/.bash_profile' do
cotent bash_profile_conent
end
廚師拋出這個錯誤:
==> Server-002: [2015-10-07T03:02:23+00:00] ERROR: Exception handlers complete
==> Server-002: Chef Client failed. 0 resources updated in 322.419863736 seconds
==> Server-002: [2015-10-07T03:02:23+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
==> Server-002: [2015-10-07T03:02:23+00:00] ERROR: /var/chef/cache/cookbooks/servers/recipes/_common_user.rb:67: invalid Unicode escape
==> Server-002: ...ian_chroot:+($debian_chroot)}\[email protected]\h:\w [$ENV]\$ "
==> Server-002: ...
顯然廚師認爲@
角色是爲Unicode轉義。
我想按原樣使用@
。我該如何解決這個錯誤?