From 041e879d6340da5a3823152eaf48418f4bc92638 Mon Sep 17 00:00:00 2001 From: Alec Thomas Date: Sat, 3 Nov 2018 09:51:57 +1100 Subject: [PATCH] Expand ~ for FileContentFlag. --- mapper.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mapper.go b/mapper.go index e4d54fd..8bd7d00 100644 --- a/mapper.go +++ b/mapper.go @@ -477,7 +477,7 @@ func JoinEscaped(s []string, sep rune) string { type FileContentFlag []byte func (f *FileContentFlag) Decode(ctx *DecodeContext) error { // nolint: golint - filename := ctx.Scan.PopValue("filename") + filename := expandPath(ctx.Scan.PopValue("filename")) data, err := ioutil.ReadFile(filename) // nolint: gosec if err != nil { return fmt.Errorf("failed to open %q: %s", filename, err)