Special characters in password result in error: syntax error near unexpected token
search cancel

Special characters in password result in error: syntax error near unexpected token

book

Article ID: 225546

calendar_today

Updated On:

Products

CA Release Automation - Release Operations Center (Nolio)

Issue/Introduction

Password special characters are giving syntax error while using the Password in a "Run Command Line" action: 

(#1) Run Command Line action has failed.
Return value: 1. Return value is not equal to expected 0
Std out:
Std err: /bin/sh: -c: line 0: syntax error near unexpected token `(' /bin/sh: -c: line 0: `isql -Uusername -P****** -Sservername:port'
Command line executed: isql -Uusername -P***** -SSservername:port
Run Command Line action has failed. Execution problem: Process exited with an error: 1 (Exit value: 1)
Process exited with an error: 1 (Exit value: 1)

 

 

Environment

Release : 6.7

Component : Release Automation Action Packs

 

Cause

The special character in the password is interpreted by the /bin/sh shell as a special character and needs to be handled in special way.

For example, if you try to run the following command then you will see the same error: /bin/sh -c 'echo <yourPassword>'

 

Resolution

Surround the password with quotation marks. 

For example, change the command from: isql -Uusername -P<passwordParameter> -Sservername:port

To: isql -Uusername -P"<passwordParameter>" -Sservername:port