mirror of
https://github.com/drone/drone-cli.git
synced 2024-11-23 01:11:57 +01:00
encrypt secret from file
This commit is contained in:
parent
ada4e9de7e
commit
1aa44328d7
@ -43,7 +43,8 @@ func encryptSecret(c *cli.Context) error {
|
|||||||
|
|
||||||
plaintext := c.Args().Get(1)
|
plaintext := c.Args().Get(1)
|
||||||
if strings.HasPrefix(plaintext, "@") {
|
if strings.HasPrefix(plaintext, "@") {
|
||||||
data, err := ioutil.ReadFile(plaintext)
|
path := strings.TrimPrefix(plaintext, "@")
|
||||||
|
data, err := ioutil.ReadFile(path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user