1
0
mirror of https://github.com/drone/drone-cli.git synced 2024-11-22 17:01:58 +01:00

encrypt secret from file

This commit is contained in:
Brad Rydzewski 2018-10-21 13:36:29 -07:00
parent ada4e9de7e
commit 1aa44328d7

@ -43,7 +43,8 @@ func encryptSecret(c *cli.Context) error {
plaintext := c.Args().Get(1)
if strings.HasPrefix(plaintext, "@") {
data, err := ioutil.ReadFile(plaintext)
path := strings.TrimPrefix(plaintext, "@")
data, err := ioutil.ReadFile(path)
if err != nil {
return err
}