Skip to content

Commit

Permalink
Scrub if exactly one serviceWanted provided (#1119)
Browse files Browse the repository at this point in the history
* Scrub if exactly one serviceWanted provided
* Assign trcPrjectService if nil
* Require servicesWanted as well
  • Loading branch information
isaac-boaz-trimble committed Jun 27, 2024
1 parent 10c4a36 commit 7175013
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion atrium/vestibulum/trcshbase/trcsh.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ func CommonMain(envPtr *string, addrPtr *string, envCtxPtr *string,
deploymentsShard := os.Getenv(deploymentsKey)

if len(deploymentsShard) == 0 {
fmt.Println("trcsh on windows requires a DEPLOYMENTS.")
fmt.Printf("trcsh on windows requires a %s.\n", deploymentsShard)
os.Exit(-1)
}

Expand Down
6 changes: 5 additions & 1 deletion pkg/cli/trcconfigbase/utils/configinator.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@ func GenerateConfigsFromVault(ctx eUtils.ProcessContext, configCtx *eUtils.Confi
for _, startDir := range driverConfig.StartDir {
//get files from directory
tp, ep := getDirFiles(startDir, driverConfig.EndDir)
if trcProjectService, ok := driverConfig.DeploymentConfig["trcprojectservice"]; ok && strings.Contains(trcProjectService.(string), "/") {
if trcProjectService, ok := driverConfig.DeploymentConfig["trcprojectservice"]; ok && len(driverConfig.ServicesWanted) == 0 && strings.Contains(trcProjectService.(string), "/") || len(driverConfig.ServicesWanted) == 1 {
if trcProjectService == nil {
// Chewbacca: Fix duplicate /'s
trcProjectService = driverConfig.ServicesWanted[0]
}
epScrubbed := []string{}
// Do some scrubbing...
for _, e := range ep {
Expand Down

0 comments on commit 7175013

Please sign in to comment.