summaryrefslogtreecommitdiffstats
path: root/pkg/commands/oscommands/os.go
diff options
context:
space:
mode:
authorRyooooooga <eial5q265e5@gmail.com>2021-08-23 22:35:19 +0900
committerJesse Duffield <jessedduffield@gmail.com>2021-08-25 21:32:48 +1000
commitc3d7de1c183ddf2bea39647114403d16825fdd9d (patch)
tree57a4ead9c3cdc0ce3a54cc697bf847953b29ff11 /pkg/commands/oscommands/os.go
parent711bd5a670f5321495700a55503e4d4a9742f7ae (diff)
Change not to use cat command
Diffstat (limited to 'pkg/commands/oscommands/os.go')
-rw-r--r--pkg/commands/oscommands/os.go13
1 files changed, 0 insertions, 13 deletions
diff --git a/pkg/commands/oscommands/os.go b/pkg/commands/oscommands/os.go
index cf050cf53..5a35b9278 100644
--- a/pkg/commands/oscommands/os.go
+++ b/pkg/commands/oscommands/os.go
@@ -24,7 +24,6 @@ import (
// Platform stores the os state
type Platform struct {
OS string
- CatCmd []string
Shell string
ShellArg string
EscapedQuote string
@@ -217,18 +216,6 @@ func (c *OSCommand) RunCommandWithOutputLive(command string, output func(string)
return RunCommandWithOutputLiveWrapper(c, command, output)
}
-func (c *OSCommand) CatFile(filename string) (string, error) {
- arr := append(c.Platform.CatCmd, filename)
- cmdStr := strings.Join(arr, " ")
- c.Log.WithField("command", cmdStr).Info("Cat")
- cmd := c.Command(arr[0], arr[1:]...)
- output, err := sanitisedCommandOutput(cmd.CombinedOutput())
- if err != nil {
- c.Log.WithField("command", cmdStr).Error(output)
- }
- return output, err
-}
-
// DetectUnamePass detect a username / password / passphrase question in a command
// promptUserForCredential is a function that gets executed when this function detect you need to fillin a password or passphrase
// The promptUserForCredential argument will be "username", "password" or "passphrase" and expects the user's password/passphrase or username back