MCPcopy Create free account
hub / github.com/devld/go-drive / platformShellCommand

Function platformShellCommand

server/thumbnail/shell.go:81–86  ·  view source on GitHub ↗
(goos, script string)

Source from the content-addressed store, hash-verified

79}
80
81func platformShellCommand(goos, script string) (string, []string) {
82 if goos == "windows" {
83 return "cmd.exe", []string{"/D", "/S", "/C", script}
84 }
85 return "/bin/sh", []string{"-c", script}
86}
87
88func (s *shellThumbnailTypeHandler) CreateThumbnail(ctx context.Context, entry ThumbnailEntry, dest io.Writer) error {
89 if s.maxSize > 0 && entry.Size() > s.maxSize {

Callers 3

TestPlatformShellCommandFunction · 0.85

Calls

no outgoing calls

Tested by 2

TestPlatformShellCommandFunction · 0.68