system

package
v0.3.0-alpha2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 28, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package system contains functionality for host-related activities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilesExistInTree

func FilesExistInTree(ctx context.Context, findScript string) (bool, error)

FilesExistInTree performs file discovery by allowing various tools to check if they need to run based on file presence.

func GetFileTypeListerCommand

func GetFileTypeListerCommand(fileType string) string

GetFileTypeListerCommand takes a ripgrep-known file type, and returns a string (to be used as an arg after `bash -c`) representing a command & its args to find matching files. ripgrep is used as the default file-finder across the codebase because not only is it fast, but it also supports files like `.gitignore` without any extra configuration.

func Init

func Init(ctx context.Context) error

Init runs setup & checks against the host itself, so that oscar can run.

func RunCommand

func RunCommand(ctx context.Context, cmdArgs []string) (string, error)

RunCommand takes a string slice containing a command & its args to run, and returns a consistent error message in case of failure. It also returns the command output, in case the caller needs to parse it on their own.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL