Skip to content

Commit 39bb741

Browse files
committed
Revert "chore: remove tweak"
This reverts commit c183e73.
1 parent 4be6304 commit 39bb741

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

pkg/osvscanner/internal/scanners/lockfile.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"context"
66
"fmt"
77
"path/filepath"
8+
"runtime"
89
"slices"
910
"strings"
1011

@@ -162,7 +163,7 @@ func ScanSingleFileWithMapping(scanPath string, pluginsToUse []plugin.Plugin) ([
162163
}
163164

164165
func parseLockfilePath(scanArg string) (string, string) {
165-
if (!strings.Contains(scanArg, ":")) {
166+
if (runtime.GOOS == "windows" && filepath.IsAbs(scanArg)) || !strings.Contains(scanArg, ":") {
166167
scanArg = ":" + scanArg
167168
}
168169

0 commit comments

Comments
 (0)