Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev #19

Merged
merged 43 commits into from
Feb 12, 2025
Merged

dev #19

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
1f815d1
Fixes to DB
maxlandon Aug 16, 2023
80e3326
Add WithTeamDirectory() option to client/servers
maxlandon Aug 17, 2023
1a31b3e
Fix version printing and add method to team.Client interface.
maxlandon Aug 17, 2023
54017bc
Move transports to example directory
maxlandon Aug 17, 2023
2ea0e4a
Print daemon listening status
maxlandon Aug 17, 2023
d8c7c9c
Fix log level not printed in status
maxlandon Aug 17, 2023
5af72d7
Add some stuff to README
maxlandon Aug 17, 2023
8c15e15
Add more to README
maxlandon Aug 17, 2023
c67f6ac
README
maxlandon Aug 17, 2023
6880015
Add code examples to readme
maxlandon Aug 17, 2023
ee2f75b
README
maxlandon Aug 17, 2023
48fc6a4
README Examples
maxlandon Aug 17, 2023
e403916
README
maxlandon Aug 17, 2023
81f898e
Differences with Hashicorp plugins
maxlandon Aug 17, 2023
dd0e577
Add README to example
maxlandon Aug 17, 2023
4c4dd5f
README
maxlandon Aug 17, 2023
d0a84a2
README
maxlandon Aug 17, 2023
deac495
Update ncruces/sqlite dependencies
maxlandon Aug 17, 2023
8435ef0
Use go1.21 in actions
maxlandon Aug 17, 2023
22bce36
Fix cgo build
maxlandon Aug 17, 2023
f77d921
Try to fix actions CodeQL
maxlandon Aug 17, 2023
eeb6493
Tidy comments
maxlandon Aug 17, 2023
3b6554d
Tidy comments
maxlandon Aug 17, 2023
7fd7c8b
Cleanup and comments tidying
maxlandon Aug 17, 2023
1840d40
Fix actions
maxlandon Aug 17, 2023
14dde50
Remove logging of cleartext credentials
maxlandon Aug 17, 2023
be74c02
Fix imports
maxlandon Aug 17, 2023
2aac56a
Fix client imports
maxlandon Aug 17, 2023
de56f43
Fix and restructure imports
maxlandon Aug 17, 2023
f5b58ee
Fix windows action
maxlandon Aug 17, 2023
754c8ea
Finish server examples code
maxlandon Aug 17, 2023
e11fb0e
Merge branch 'main' into dev
maxlandon Aug 17, 2023
6ba1009
Fix imports and update survey version
maxlandon Aug 17, 2023
bfaf8ef
Fix imports AGAIN
maxlandon Aug 17, 2023
c8e8313
Fix wrong server configs directory usage
maxlandon Aug 17, 2023
83753bc
Fixes to security alerts
maxlandon Aug 17, 2023
9d570b3
Update dependencies
maxlandon Dec 20, 2023
bb9d1e2
Remove useless imports in cgo build
maxlandon Dec 20, 2023
f2791a9
Format
maxlandon Dec 20, 2023
5f78601
Merge branch 'main' into dev
maxlandon Dec 20, 2023
e4c9c91
Fix and clean the user permissions system
maxlandon Feb 12, 2025
849ae28
Update cobra
maxlandon Feb 12, 2025
1bd9206
Merge branch 'main' into dev
maxlandon Feb 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions client/commands/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,12 @@ import (
"path/filepath"
"strings"

"github.com/reeflective/team/client"
"github.com/reeflective/team/internal/command"
"github.com/rsteube/carapace"
"github.com/rsteube/carapace/pkg/style"
"github.com/spf13/cobra"
"github.com/spf13/pflag"

"github.com/reeflective/team/client"
"github.com/reeflective/team/internal/command"
)

// Generate returns a command tree to embed in client applications connecting
Expand Down Expand Up @@ -108,7 +107,7 @@ func clientCommands(cli *client.Client) *cobra.Command {

importCmd := &cobra.Command{
Use: "import",
Short: fmt.Sprintf("Import a teamserver client configuration file for %s", cli.Name()),
Short: "Import a teamserver client configuration file for " + cli.Name(),
Run: importCmd(cli),
ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
return []string{}, cobra.ShellCompDirectiveDefault
Expand Down
5 changes: 2 additions & 3 deletions client/commands/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,10 @@ import (
"encoding/json"
"fmt"

"github.com/sirupsen/logrus"
"github.com/spf13/cobra"

"github.com/reeflective/team/client"
"github.com/reeflective/team/internal/command"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)

func importCmd(cli *client.Client) func(cmd *cobra.Command, args []string) {
Expand Down
5 changes: 2 additions & 3 deletions client/commands/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,10 @@ import (
"time"

"github.com/jedib0t/go-pretty/v6/table"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"

"github.com/reeflective/team/client"
"github.com/reeflective/team/internal/command"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)

func usersCmd(cli *client.Client) func(cmd *cobra.Command, args []string) error {
Expand Down
5 changes: 2 additions & 3 deletions client/commands/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,10 @@ import (
"fmt"
"time"

"github.com/sirupsen/logrus"
"github.com/spf13/cobra"

"github.com/reeflective/team/client"
"github.com/reeflective/team/internal/command"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)

func versionCmd(cli *client.Client) func(cmd *cobra.Command, args []string) error {
Expand Down
5 changes: 3 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ require (
github.com/gofrs/uuid v4.4.0+incompatible
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0
github.com/jedib0t/go-pretty/v6 v6.4.6
github.com/lib/pq v1.10.9
github.com/ncruces/go-sqlite3 v0.8.4
github.com/ncruces/go-sqlite3/gormlite v0.8.4
github.com/psanford/memfs v0.0.0-20230130182539-4dbf7e3e865e
github.com/rsteube/carapace v0.47.4
github.com/sirupsen/logrus v1.9.3
github.com/spf13/cobra v1.8.0
github.com/spf13/pflag v1.0.5
github.com/spf13/cobra v1.8.1
github.com/spf13/pflag v1.0.6
google.golang.org/grpc v1.56.1
google.golang.org/protobuf v1.31.0
gorm.io/driver/mysql v1.5.1
Expand Down
12 changes: 7 additions & 5 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZx
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/creack/pty v1.1.17 h1:QeVUsEDNrLBW4tMgZHvxy18sKtr6VI492kBhUfhDJNI=
github.com/creack/pty v1.1.17/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand Down Expand Up @@ -81,6 +81,8 @@ github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NB
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw=
github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8=
github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
Expand Down Expand Up @@ -115,8 +117,6 @@ github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY=
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA=
github.com/rsteube/carapace v0.37.3 h1:Us0AnzZ0JiWVHmETSX8PBgp2UJCf/O7KhgSKSpokkII=
github.com/rsteube/carapace v0.37.3/go.mod h1:jkLt41Ne2TD2xPuMdX/2O05Smhy8vMgG7O2TYvC0yOc=
github.com/rsteube/carapace v0.47.4 h1:LwnkFsvRxc2WhZjM63QS7sCi3DlM9XGuATQM5rehgps=
github.com/rsteube/carapace v0.47.4/go.mod h1:4ZC5bulItu9t9sZ5yPcHgPREd8rPf274Q732n+wfl/o=
github.com/rsteube/carapace-shlex v0.1.1 h1:fRQEBBKyYKm4TXUabm4tzH904iFWSmXJl3UZhMfQNYU=
Expand All @@ -125,12 +125,14 @@ github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQD
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I=
github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0=
github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0=
github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho=
github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM=
github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o=
github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
Expand Down
2 changes: 2 additions & 0 deletions internal/db/certificates.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ func (c *Certificate) BeforeCreate(tx *gorm.DB) (err error) {
if err != nil {
return err
}

c.CreatedAt = time.Now()

return nil
}
3 changes: 1 addition & 2 deletions internal/db/sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,12 @@ import (
"fmt"
"time"

"github.com/reeflective/team/internal/log"
"github.com/sirupsen/logrus"
"gorm.io/driver/mysql"
"gorm.io/driver/postgres"
"gorm.io/gorm"
"gorm.io/gorm/logger"

"github.com/reeflective/team/internal/log"
)

const (
Expand Down
19 changes: 14 additions & 5 deletions internal/db/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,18 @@ import (
"time"

"github.com/gofrs/uuid"
"github.com/lib/pq"
"gorm.io/gorm"
)

// User - A teamserver user.
type User struct {
ID uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
CreatedAt time.Time `gorm:"->;<-:create;"`
LastSeen time.Time
Name string
Token string `gorm:"uniqueIndex"`
ID uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
CreatedAt time.Time `gorm:"->;<-:create;"`
LastSeen time.Time
Name string
Token string `gorm:"uniqueIndex"`
Permissions pq.StringArray `gorm:"type:text[]"`
}

// BeforeCreate - GORM hook.
Expand All @@ -45,3 +47,10 @@ func (o *User) BeforeCreate(tx *gorm.DB) (err error) {

return nil
}

type Permissions struct {
ID uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
CreatedAt time.Time `gorm:"->;<-:create;"`
LastSeen time.Time
Name string
}
10 changes: 6 additions & 4 deletions server/commands/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,13 @@ package commands
import (
"fmt"

"github.com/rsteube/carapace"
"github.com/spf13/cobra"
"github.com/spf13/pflag"

"github.com/reeflective/team/client"
cli "github.com/reeflective/team/client/commands"
"github.com/reeflective/team/internal/command"
"github.com/reeflective/team/server"
"github.com/rsteube/carapace"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
)

// Generate returns a "teamserver" command root and its tree for teamserver (server-side) management.
Expand Down Expand Up @@ -121,6 +120,7 @@ func serverCommands(server *server.Server, client *client.Client) *cobra.Command
if cmd.PersistentPreRunE != nil {
cmd.PersistentPreRunE(cmd, args)
}

if cmd.PreRunE != nil {
cmd.PreRunE(cmd, args)
}
Expand Down Expand Up @@ -195,6 +195,7 @@ func serverCommands(server *server.Server, client *client.Client) *cobra.Command
userFlags.StringP("save", "s", "", "directory/file in which to save config")
userFlags.StringP("name", "n", "", "user name")
userFlags.BoolP("system", "U", false, "Use the current OS user, and save its configuration directly in client dir")
userFlags.StringSliceP("permissions", "P", []string{}, "list of permission strings for custom RPC auth")
userCmd.Flags().AddFlagSet(userFlags)

userComps := make(carapace.ActionMap)
Expand All @@ -221,6 +222,7 @@ func serverCommands(server *server.Server, client *client.Client) *cobra.Command
if cmd.PersistentPreRunE != nil {
cmd.PersistentPreRunE(cmd, args)
}

if cmd.PreRunE != nil {
cmd.PreRunE(cmd, args)
}
Expand Down
9 changes: 4 additions & 5 deletions server/commands/completers.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@ import (
"net"
"strings"

"github.com/rsteube/carapace"

"github.com/reeflective/team/client"
"github.com/reeflective/team/server"
"github.com/rsteube/carapace"
)

// interfacesCompleter completes interface addresses on the client host.
Expand Down Expand Up @@ -75,10 +74,10 @@ func userCompleter(client *client.Client, server *server.Server) carapace.Comple
}

if len(results) == 0 {
return carapace.ActionMessage(fmt.Sprintf("%s teamserver has no users", server.Name()))
return carapace.ActionMessage(server.Name() + " teamserver has no users")
}

return carapace.ActionValues(results...).Tag(fmt.Sprintf("%s teamserver users", server.Name()))
return carapace.ActionValues(results...).Tag(server.Name() + " teamserver users")
}
}

Expand Down Expand Up @@ -136,6 +135,6 @@ func listenerTypeCompleter(client *client.Client, server *server.Server) carapac
return carapace.ActionMessage(fmt.Sprintf("no additional listener types for %s teamserver", server.Name()))
}

return carapace.ActionValues(results...).Tag(fmt.Sprintf("%s teamserver listener types", server.Name()))
return carapace.ActionValues(results...).Tag(server.Name() + " teamserver listener types")
}
}
7 changes: 3 additions & 4 deletions server/commands/teamserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,12 @@ import (
"strings"

"github.com/jedib0t/go-pretty/v6/table"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"

"github.com/reeflective/team/internal/command"
"github.com/reeflective/team/internal/log"
"github.com/reeflective/team/internal/systemd"
"github.com/reeflective/team/server"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)

func daemoncmd(serv *server.Server) func(cmd *cobra.Command, args []string) error {
Expand All @@ -59,7 +58,7 @@ func daemoncmd(serv *server.Server) func(cmd *cobra.Command, args []string) erro
// Also written to logs in the teamserver code.
defer func() {
if r := recover(); r != nil {
fmt.Fprintf(cmd.OutOrStdout(), "stacktrace from panic: \n"+string(debug.Stack()))
fmt.Fprintf(cmd.OutOrStdout(), "%s", "stacktrace from panic: \n"+string(debug.Stack()))
}
}()

Expand Down
11 changes: 6 additions & 5 deletions server/commands/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@ import (
"path/filepath"
"strings"

"github.com/sirupsen/logrus"
"github.com/spf13/cobra"

"github.com/reeflective/team/client"
"github.com/reeflective/team/internal/assets"
"github.com/reeflective/team/internal/command"
"github.com/reeflective/team/server"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)

func createUserCmd(serv *server.Server, cli *client.Client) func(cmd *cobra.Command, args []string) {
Expand All @@ -31,6 +30,7 @@ func createUserCmd(serv *server.Server, cli *client.Client) func(cmd *cobra.Comm
lport, _ := cmd.Flags().GetUint16("port")
save, _ := cmd.Flags().GetString("save")
system, _ := cmd.Flags().GetBool("system")
perms, _ := cmd.Flags().GetStringSlice("permissions")

if save == "" {
save, _ = os.Getwd()
Expand All @@ -57,6 +57,7 @@ func createUserCmd(serv *server.Server, cli *client.Client) func(cmd *cobra.Comm
}
} else {
saveTo, _ = filepath.Abs(save)

userFile, err := os.Stat(saveTo)
if !os.IsNotExist(err) && !userFile.IsDir() {
fmt.Fprintf(cmd.ErrOrStderr(), command.Warn+"File already exists %s\n", err)
Expand All @@ -70,7 +71,7 @@ func createUserCmd(serv *server.Server, cli *client.Client) func(cmd *cobra.Comm

fmt.Fprintf(cmd.OutOrStdout(), command.Info+"Generating new client certificate, please wait ... \n")

config, err := serv.UserCreate(name, lhost, lport)
config, err := serv.UserCreate(name, lhost, lport, perms...)
if err != nil {
fmt.Fprintf(cmd.ErrOrStderr(), command.Warn+"%s\n", err)
return
Expand Down Expand Up @@ -145,8 +146,8 @@ func importCACmd(serv *server.Server) func(cmd *cobra.Command, args []string) {
}

importCA := &CA{}
err = json.Unmarshal(data, importCA)

err = json.Unmarshal(data, importCA)
if err != nil {
fmt.Fprintf(cmd.ErrOrStderr(), command.Warn+"Failed to parse file: %s\n", err)
}
Expand Down
2 changes: 1 addition & 1 deletion server/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ func (ts *Server) getDefaultDatabaseConfig() *db.Config {
if ts.opts.inMemory {
cfg.Database = db.SQLiteInMemoryHost
} else {
cfg.Database = filepath.Join(ts.TeamDir(), fmt.Sprintf("%s.teamserver.db", ts.name))
cfg.Database = filepath.Join(ts.TeamDir(), ts.name+".teamserver.db")
}

return cfg
Expand Down
3 changes: 1 addition & 2 deletions server/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package server
*/

import (
"fmt"
"os"
"strings"

Expand Down Expand Up @@ -77,7 +76,7 @@ func (ts *Server) apply(options ...Options) {
// set once when created.
ts.initOpts.Do(func() {
// Application home directory.
homeDir := os.Getenv(fmt.Sprintf("%s_ROOT_DIR", strings.ToUpper(ts.name)))
homeDir := os.Getenv(strings.ToUpper(ts.name) + "_ROOT_DIR")
if homeDir != "" {
ts.homeDir = homeDir
} else {
Expand Down
Loading
Loading