forked from TrueCloudLab/restic
add environment-var expanding for exclude-files
This commit is contained in:
parent
5b33a7a903
commit
9644399074
1 changed files with 5 additions and 4 deletions
|
@ -6,15 +6,15 @@ import (
|
|||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"golang.org/x/crypto/ssh/terminal"
|
||||
"restic"
|
||||
"restic/backend"
|
||||
"restic/debug"
|
||||
"restic/filter"
|
||||
"restic/repository"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"golang.org/x/crypto/ssh/terminal"
|
||||
)
|
||||
|
||||
type CmdBackup struct {
|
||||
|
@ -313,6 +313,7 @@ func (cmd CmdBackup) Execute(args []string) error {
|
|||
for scanner.Scan() {
|
||||
line := scanner.Text()
|
||||
if !strings.HasPrefix(line, "#") {
|
||||
line = os.ExpandEnv(line)
|
||||
cmd.Excludes = append(cmd.Excludes, line)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue