Skip to content

Commit 32acb09

Browse files
mads-hartmannroboquat
authored andcommitted
Only exit if installing SSH keys fails
1 parent 9a6e19e commit 32acb09

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

dev/preview/previewctl/cmd/stale.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ func newListStaleCmd(logger *logrus.Logger) *cobra.Command {
3333
Short: "Get preview envs that are inactive (no branch with recent commits, and no db activity in the last 48h)",
3434
RunE: func(cmd *cobra.Command, args []string) error {
3535
if _, err := os.Stat(opts.sshPrivateKeyPath); errors.Is(err, fs.ErrNotExist) {
36-
return preview.InstallVMSSHKeys()
36+
opts.logger.Debug("Installing SSH keys")
37+
if err := preview.InstallVMSSHKeys(); err != nil {
38+
return err
39+
}
3740
}
3841

3942
statuses, err := opts.listWorskpaceStatus(ctx)

0 commit comments

Comments
 (0)