From b00095e927a0003690ad01522e59b1b437638a0a Mon Sep 17 00:00:00 2001 From: Alexis Kulash Date: Wed, 27 Jan 2021 16:29:20 -0500 Subject: [PATCH] Stripping and replacing tildas to fix bug --- internal/cli/rules.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/cli/rules.go b/internal/cli/rules.go index a579d0b6c..24e5f98d3 100644 --- a/internal/cli/rules.go +++ b/internal/cli/rules.go @@ -489,8 +489,9 @@ func disableRule(rule *management.Rule, cli *cli) error { return cli.api.Rule.Update(rule.GetID(), &management.Rule{Enabled: auth0.Bool(false)}) } -// TODO: Fix tildas when passing relative filepaths, e.g. ~/Downloads/example.js func parseFileByName(inputFile string) (string, error) { + inputFile = strings.Replace(inputFile, "~/", "../", -1) + f, err := ioutil.ReadFile(inputFile) if err != nil {