sudoformatter

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatCommandBasedOnSudo

func FormatCommandBasedOnSudo(sudo bool, sudoPassword string, Env entity.EnvList, command string, c entity.ClientFacade, task entity.Task, isLocal bool) string

FormatCommandBasedOnSudo returns the command to be executed

`register` bash function is injected here, injected only for non sudo invocations if sudo is set to true, the command will be wrapped into script and and remote command will just execute that script

which means we have to inject the command into a script for sudo invocation too and that happens to hapen inside func (c *SSHClient) GenerateOnRemote(data []byte) error which shares the same code defined in lobby.RegisterCmd

Types

This section is empty.

Jump to

Keyboard shortcuts

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