Skip to content

Commit 688956b

Browse files
author
Альберт Скальт
committed
start: create logs directory in interactive mode
Prior the patch logs directory was not created on `tt start -i`, which led to, for example, the inability to clean the instance. This patch fixes it.
1 parent 2eba9ef commit 688956b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

cli/running/running.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -751,10 +751,8 @@ func FillCtx(cliOpts *config.CliOpts, cmdCtx *cmdcontext.CmdCtx,
751751
func RunInstance(ctx context.Context, cmdCtx *cmdcontext.CmdCtx, inst InstanceCtx,
752752
stdOut, stdErr io.Writer,
753753
) error {
754-
for _, dataDir := range [...]string{inst.WalDir, inst.VinylDir, inst.MemtxDir, inst.RunDir} {
755-
if err := util.CreateDirectory(dataDir, defaultDirPerms); err != nil {
756-
return err
757-
}
754+
if err := createInstanceDataDirectories(inst); err != nil {
755+
return fmt.Errorf("failed to create a directory: %s", err)
758756
}
759757

760758
logger := ttlog.NewCustomLogger(stdOut, "", 0)

0 commit comments

Comments
 (0)