Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 1 addition & 2 deletions cmd/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func runDeploy(cmd *cobra.Command, args []string) error {
return errors.New("already in a roxie sub-shell (ROXIE_SHELL environment variable is set), please exit the shell and try again")
}

if !env.RunningInteractively && envrc == "" {
if components.IncludesCentral() && !env.RunningInteractively && envrc == "" {
return errors.New("running without a controlling terminal requires --envrc to be set")
}

Expand Down Expand Up @@ -179,7 +179,6 @@ func runDeploy(cmd *cobra.Command, args []string) error {
}

if envrc != "" {
log.Dimf("Writing environment variables to %s", envrc)
d.SetEnvrcFile(envrc)
}

Expand Down
1 change: 1 addition & 0 deletions internal/deployer/deployer.go
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,7 @@ func (d *Deployer) deployCentral(ctx context.Context, resources, exposure string

// envrc may be used from different processes, so use actual endpoint not port-forward
if d.envrcFile != "" {
d.logger.Dimf("Writing environment variables to %s", d.envrcFile)
if err := d.writeEnvrcFile(ctx, exposure, portForwardWanted); err != nil {
d.logger.Warningf("Failed to write envrc file: %v", err)
}
Expand Down
Loading