MCPcopy Index your code
hub / github.com/celer-pkg/celer / executeCmd

Method executeCmd

completion/powershell.go:250–260  ·  view source on GitHub ↗
(name string, args ...string)

Source from the content-addressed store, hash-verified

248}
249
250func (p powershell) executeCmd(name string, args ...string) error {
251 cmd := exec.Command(name, args...)
252 if output, err := cmd.CombinedOutput(); err != nil {
253 if msg := strings.TrimSpace(string(output)); msg != "" {
254 return fmt.Errorf("%w: %s", err, msg)
255 }
256 return err
257 }
258
259 return nil
260}
261
262func NewPowerShellCompletion(homeDir string, rootCmd *cobra.Command) powershell {
263 return powershell{

Callers 1

installBinaryMethod · 0.95

Calls 1

CommandMethod · 0.65

Tested by

no test coverage detected