Skip to content
This repository has been archived by the owner on Jan 23, 2019. It is now read-only.

Removed escaping from DROP ROLE due to error being thrown while dropping user. #148

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

germs12
Copy link

@germs12 germs12 commented May 27, 2015

I encountered the following issue while trying to drop a user:

================================================================================
Error executing action `run` on resource 'execute[drop postgresql user abc123]'
================================================================================

Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of psql -c 'DROP ROLE IF EXISTS \"abc123\"' ----
STDOUT: 
STDERR: ERROR:  syntax error at or near "\"
LINE 1: DROP ROLE IF EXISTS \"abc123\"
                            ^
---- End output of psql -c 'DROP ROLE IF EXISTS \"abc123\"' ----
Ran psql -c 'DROP ROLE IF EXISTS \"abc123\"' returned 1

and was able to remedy it by removing the escaping that was happening within the user.rb file. It took a couple edits to get it right, so my version jumped by 2. I'm also a chef n00b, so let me know if something needs to be modified. Thanks!

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.

1 participant