I am trying to escape this environment variable with parenthesis in it.
env:
- DATABASE_URL: "mssql+pyodbc://sa:yourStrong(!)Password@127.0.0.1:1433/{db_name}?driver=FreeTDS&autocommit=True"
But whatever I do, I doesn’t help - https://travis-ci.com/epam/OSCI/builds/145174414#L190
Setting environment variables from .travis.yml
$ export DATABASE_URL=mssql+pyodbc://sa:yourStrong(!)Password@127.0.0.1:1433/{db_name}?driver=FreeTDS&autocommit=True
/home/travis/.travis/functions: eval: line 109: syntax error near unexpected token `('
/home/travis/.travis/functions: eval: line 109: `export DATABASE_URL=mssql+pyodbc://sa:yourStrong(!)Password@127.0.0.1:1433/{db_name}?driver=FreeTDS&autocommit=True '
I tried.
- Using single quotes - https://travis-ci.com/epam/OSCI/builds/145175945 - the same error
- Escaping with
\(
- build didn’t start - invalid YAML - Escaping with
\\(
- https://travis-ci.com/epam/OSCI/builds/145177245 - the… wait… I was about to write that the output is the same, but it is now complaining about the closing)
! It might be a valid solution. I still finish this for completeness - Escaping with
\\\\\(
- https://travis-ci.com/epam/OSCI/builds/145196364 - the same error as 1
I tried \(!\)
with single quotes - the original error is gone, the build continued https://travis-ci.com/epam/OSCI/builds/145202827 but the actual code that uses the variable failed and I need more test to troubleshoout it.
Because I also already wasted a couple of hours here as this gentleman below, I highly recommend upvoting his proposal.