Skip to content

Commit

Permalink
Fix post init
Browse files Browse the repository at this point in the history
Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
  • Loading branch information
slankdev committed Oct 31, 2020
1 parent b02c596 commit 5021cc3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions command_func.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,13 +207,6 @@ func CmdUp(c *cli.Context) error {
return err
}

if len(tnconfig.PostInit) != 0 {
for _, postInitCmds := range tnconfig.PostInit {
postExecInitCmds := shell.ExecCmd(postInitCmds.Cmds)
utils.PrintCmds(os.Stdout, postExecInitCmds, verbose)
}
}

for _, node := range tnconfig.Nodes {
if node.Type == "docker" || node.Type == "" {
delNsCmd := node.DelNsCmd()
Expand All @@ -226,6 +219,13 @@ func CmdUp(c *cli.Context) error {
}
}

if len(tnconfig.PostInit) != 0 {
for _, postInitCmds := range tnconfig.PostInit {
postExecInitCmds := shell.ExecCmd(postInitCmds.Cmds)
utils.PrintCmds(os.Stdout, postExecInitCmds, verbose)
}
}

return nil
}

Expand Down

0 comments on commit 5021cc3

Please sign in to comment.