mattmilten
mattmilten

Reputation: 6706

Secure Appveyor variables in PowerShell

How to use a secure variable in a PowerShell command?

Example:

environment:
  password:
    secure: HEa8MAJyyfSv33snyK3Gleflk9SIfZBxbnTiS39hlWM=

install:
- ps: $env:password

Nothing is printed by this command. According to this page this is the way to use environment variables in PowerShell but apparently the secure Appveyor variable is not there.

Upvotes: 2

Views: 270

Answers (1)

mattmilten
mattmilten

Reputation: 6706

I found the culprit:

From the Appveyor webpage about secure variables:

secure variables are not decoded during Pull Request

That was exactly what I was trying to do.

As mentioned in the comments, secure variables can be activated in the Appveyor project settings and everything works as intended.

Upvotes: 2

Related Questions