Skip to content

config folder not created at the first execution #29

@pdion891

Description

@pdion891

the first time cmk is executed, it crash if ~/.cmk folder does not exist. Shouldn't it be created automatically?

cloudstack-cloudmonkey git:(master) ./bin/cmk 
Failed to grab config file lock, please try again
Apache CloudStack 🐵 CloudMonkey 6.0.0-beta1
Report issues: https://github.com/apache/cloudstack-cloudmonkey/issues

Failed to open history file: open /home/pldion/.cmk/history: no such file or directory
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x66296a]

goroutine 1 [running]:
github.com/apache/cloudstack-cloudmonkey/config.(*Config).GetPrompt(0xc0001284d0, 0xb, 0xc000c74f60)
	/home/pldion/Documents/apache.org/cloudstack-cloudmonkey/config/prompt.go:51 +0x2a
github.com/apache/cloudstack-cloudmonkey/cli.ExecPrompt()
	/home/pldion/Documents/apache.org/cloudstack-cloudmonkey/cli/prompt.go:48 +0x9a
main.main()
	/home/pldion/Documents/apache.org/cloudstack-cloudmonkey/cmk.go:66 +0x168
➜  cloudstack-cloudmonkey git:(master) mkdir ~/.cmk
➜  cloudstack-cloudmonkey git:(master) ./bin/cmk   
Apache CloudStack 🐵 CloudMonkey 6.0.0-beta1
Report issues: https://github.com/apache/cloudstack-cloudmonkey/issues

(localcloud) 🐱 > quit

But Cool it's golang now, it load much faster :-)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions