Executing/Calling alias in Chef

Hi Experts,

I would like to seek guidance on the issue I am encountering right now.
one of the requiremnt I am working on is to call the alias defined in ~/.bashrc.

I have the following code


call_relese.rb

execute “invoke alias” do
command <<-EOH
source ~/.bashrc
shopt -s expand_aliases
release
EOH
user root
action :run
end


~/.bashrc

alias reset=’’

when executing the comand manually in shell, there is no problem, it works perfectly but when I execute it in shell, it alwasy return an error eventhough the process is successfull too.

had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received ‘1’

is there a special method or way in Chef recipe when calling alias?

Thanks,
had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received ‘1’

Thanks…