Skip to content

Commit

Permalink
Merge pull request #60 from tinynetwork/slankdev-fix-postinit
Browse files Browse the repository at this point in the history
Fix post init
  • Loading branch information
ak1ra24 authored Nov 4, 2020
2 parents b02c596 + 5021cc3 commit 7951d31
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 7951d31

Please sign in to comment.