Skip to content

Commit

Permalink
Merge pull request #66 from srl-wim/lab-path-msg
Browse files Browse the repository at this point in the history
fixed path to the dir in the log msg
  • Loading branch information
hellt authored Sep 29, 2020
2 parents 55b10c1 + 42abfce commit f11586e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion clab/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions cmd/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit f11586e

Please sign in to comment.