Skip to content

Commit

Permalink
Check if radixconfig file exist
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard87 committed Nov 3, 2023
1 parent 4c10fc0 commit cb9c6fb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package cmd

import (
"fmt"
"os"

"github.com/equinor/radix-operator/pkg/apis/radixvalidators"
"github.com/equinor/radix-operator/pkg/apis/utils"
Expand All @@ -37,6 +38,10 @@ var validateCmd = &cobra.Command{
return err
}

if _, err := os.Stat(radixconfig); errors.Is(err, os.ErrNotExist) {
return errors.New(fmt.Sprintf("Config file note found: %s", radixconfig))
}

ra, err := utils.GetRadixApplicationFromFile(radixconfig)
if err != nil {
fmt.Println(err)
Expand Down

0 comments on commit cb9c6fb

Please sign in to comment.