Skip to content

Commit

Permalink
CR changes
Browse files Browse the repository at this point in the history
  • Loading branch information
attiasas committed Feb 2, 2025
1 parent 14b606f commit 139a81d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion utils/consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const (
AllowedLicensesEnv = "JF_ALLOWED_LICENSES"
SkipAutoInstallEnv = "JF_SKIP_AUTO_INSTALL"
AllowPartialResultsEnv = "JF_ALLOW_PARTIAL_RESULTS"
WatchesDelimiter = ","
CommaDelimiter = ","

// Email related environment variables
//#nosec G101 -- False positive - no hardcoded credentials.
Expand Down
7 changes: 4 additions & 3 deletions utils/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ import (
"context"
"errors"
"fmt"
"gopkg.in/yaml.v2"
"net/http"
"net/url"
"os"
"path/filepath"
"strconv"
"strings"

"gopkg.in/yaml.v2"

"github.com/jfrog/jfrog-cli-security/utils/techutils"
"github.com/jfrog/jfrog-cli-security/utils/xsc"
"github.com/jfrog/jfrog-client-go/xsc/services"
Expand Down Expand Up @@ -98,7 +99,7 @@ type Project struct {

func (p *Project) setDefaultsIfNeeded() error {
if len(p.WorkingDirs) == 0 {
workingDirs, _ := readArrayParamFromEnv(WorkingDirectoryEnv, WatchesDelimiter)
workingDirs, _ := readArrayParamFromEnv(WorkingDirectoryEnv, CommaDelimiter)
if len(workingDirs) == 0 {
// If no working directories are provided, and none exist in the environment variable, we designate the project's root directory as our sole working directory.
// We then execute a recursive scan across the entire project, commencing from the root.
Expand Down Expand Up @@ -294,7 +295,7 @@ type JFrogPlatform struct {
func (jp *JFrogPlatform) setDefaultsIfNeeded() (err error) {
e := &ErrMissingEnv{}
if len(jp.Watches) == 0 {
if jp.Watches, err = readArrayParamFromEnv(jfrogWatchesEnv, WatchesDelimiter); err != nil && !e.IsMissingEnvErr(err) {
if jp.Watches, err = readArrayParamFromEnv(jfrogWatchesEnv, CommaDelimiter); err != nil && !e.IsMissingEnvErr(err) {
return
}
}
Expand Down

0 comments on commit 139a81d

Please sign in to comment.