From 42abfce798a404c00603d386f2fe522dde6a97e4 Mon Sep 17 00:00:00 2001 From: hellt Date: Sun, 27 Sep 2020 22:40:55 +0300 Subject: [PATCH] fixed path to the dir in the log msg --- clab/file.go | 3 ++- cmd/deploy.go | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/clab/file.go b/clab/file.go index a16f032b1..25067e4f6 100644 --- a/clab/file.go +++ b/clab/file.go @@ -134,7 +134,8 @@ func createFile(file, content string) { } } -// CreateDirectory creates a directory +// CreateDirectory creates a directory by a path with a mode/permission specified by perm. +// If directory exists, the function does not do anything. func CreateDirectory(path string, perm os.FileMode) { if _, err := os.Stat(path); os.IsNotExist(err) { os.Mkdir(path, perm) diff --git a/cmd/deploy.go b/cmd/deploy.go index 874435455..e7a62bfd0 100644 --- a/cmd/deploy.go +++ b/cmd/deploy.go @@ -22,8 +22,8 @@ var ipv6Subnet net.IPNet // deployCmd represents the deploy command var deployCmd = &cobra.Command{ - Use: "deploy", - Short: "deploy a lab", + Use: "deploy", + Short: "deploy a lab", Aliases: []string{"dep"}, Run: func(cmd *cobra.Command, args []string) { c := clab.NewContainerLab(debug) @@ -46,7 +46,7 @@ var deployCmd = &cobra.Command{ defer cancel() // create lab directory - log.Info("Creating container lab directory: ", topo) + log.Info("Creating lab directory: ", c.Dir.Lab) clab.CreateDirectory(c.Dir.Lab, 0755) // create root CA