From 59fdd904af445f5a90568b4931a6e7e6a2aa5cb2 Mon Sep 17 00:00:00 2001 From: Richard Gomez <32133502+rgmz@users.noreply.github.com> Date: Thu, 20 Feb 2025 12:32:47 -0500 Subject: [PATCH] fix(cmd): parse platform in detect (#1765) --- cmd/detect.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/detect.go b/cmd/detect.go index 67c6e35c..10ef1243 100644 --- a/cmd/detect.go +++ b/cmd/detect.go @@ -99,7 +99,7 @@ func runDetect(cmd *cobra.Command, args []string) { logOpts = mustGetStringFlag(cmd, "log-opts") gitCmd *sources.GitCmd scmPlatform scm.Platform - remote = detect.NewRemoteInfo(scmPlatform, source) + remote *detect.RemoteInfo ) if gitCmd, err = sources.NewGitLogCmd(source, logOpts); err != nil { logging.Fatal().Err(err).Msg("could not create Git cmd") @@ -107,6 +107,7 @@ func runDetect(cmd *cobra.Command, args []string) { if scmPlatform, err = scm.PlatformFromString(mustGetStringFlag(cmd, "platform")); err != nil { logging.Fatal().Err(err).Send() } + remote = detect.NewRemoteInfo(scmPlatform, source) if findings, err = detector.DetectGit(gitCmd, remote); err != nil { // don't exit on error, just log it