Skip to content

Commit b333270

Browse files
committed
update readme
1 parent b1d09b3 commit b333270

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

Readme.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,14 @@ This will create a key file `{environment}.key` and an encrypted credentials fil
5353
sicher edit
5454
```
5555

56+
OR
57+
58+
to use the key from environment variable:
59+
60+
```shell
61+
env SICHER_MASTER_KEY=`{YOUR_KEY_HERE}` sicher edit
62+
```
63+
5664
**_Optional flags:_**
5765

5866
| flag | description | default | options |
@@ -105,12 +113,6 @@ The `LoadEnv` function will load the credentials from the encrypted file `{envir
105113

106114
The key also be loaded from the environment variable `SICHER_MASTER_KEY`. In production, storing the key in the environment variable is recommended.
107115

108-
To use the key from environment variable:
109-
110-
```shell
111-
env SICHER_MASTER_KEY=`{YOUR_KEY_HERE}` sicher edit
112-
```
113-
114116
All env files should be in the format like the example below:
115117

116118
For `dotenv`:

sicher.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ func (s *sicher) Edit(editor ...string) error {
202202
return fmt.Errorf("error creating temp file %v", err)
203203
}
204204
defer f.Close()
205+
f.Chmod(0600)
205206
filePath := f.Name()
206207
defer cleanUpFile(filePath)
207208

0 commit comments

Comments
 (0)