From 8ed337e0579e6575bc136c9a70d237ce09f26b85 Mon Sep 17 00:00:00 2001 From: Sagi Cohen Date: Thu, 13 Jun 2024 17:20:08 +0300 Subject: [PATCH] Fix: Utilize the valid permissions output file path from flag --- cmd/common_args.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cmd/common_args.go b/cmd/common_args.go index e6a3f597..83a895dc 100644 --- a/cmd/common_args.go +++ b/cmd/common_args.go @@ -7,14 +7,15 @@ import ( "log" "net/http" + "github.com/spf13/pflag" + "github.com/spf13/viper" + "github.com/Legit-Labs/legitify/internal/common/scm_type" "github.com/Legit-Labs/legitify/internal/errlog" "github.com/Legit-Labs/legitify/internal/outputer/formatter" "github.com/Legit-Labs/legitify/internal/outputer/scheme" "github.com/Legit-Labs/legitify/internal/outputer/scheme/converter" "github.com/Legit-Labs/legitify/internal/screen" - "github.com/spf13/pflag" - "github.com/spf13/viper" ) type args struct { @@ -78,7 +79,7 @@ func (a *args) applyOutputOptions() (preExitHook func(), err error) { if err != nil { return nil, err } - permFile, err := setPermissionsOutputFile(analyzeGptArgs.PermissionsOutputFile) + permFile, err := setPermissionsOutputFile(a.PermissionsOutputFile) if err != nil { return nil, err }