Skip to content

Commit

Permalink
Stripping and replacing tildas to fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexis Kulash committed Jan 27, 2021
1 parent 895677f commit b00095e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/cli/rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit b00095e

Please sign in to comment.