azukiapp / azk

azk is a lightweight open source development environment orchestration tool. Instantly & safely run any environment on your local machine.
http://azk.io
Apache License 2.0
897 stars 63 forks source link

Unclear message when virtual box is not installed #406

Open cirdes opened 9 years ago

cirdes commented 9 years ago

Trying to init azk agent without virtual box installed throws this error

azk: cool! Thanks for helping us make azk better :)
azk: Wait, this process may take several minutes
azk: Loading settings and checking dependencies.
azk: Checking version...
azk: azk 0.12.1 detected
azk: azk updated, checking update procedures...
azk: Changing domain upgrading, (issue: #255)
azk: Renaming VirtualBox machine azk-vm-azk.dev to azk-vm-dev.azk.io
azk: Error: spawn ENOENT
azk:     at errnoException (child_process.js:1011:11)
azk:     at Process.ChildProcess._handle.onexit (child_process.js:802:34)
azk: From previous event:
azk:     at Object.newMod.(anonymous function) [as info] (/azk:0.12.1/src/utils/index.js:147:39)
azk:     at Object.info (/azk:0.12.1/src/agent/vm.js:248:20)
azk:     at Object.isInstalled (/azk:0.12.1/src/agent/vm.js:323:17)
azk:     at Object.rename (/azk:0.12.1/src/agent/vm.js:315:17)
azk:     at Array.callee$1$0$ (/azk:0.12.1/src/agent/migrations.js:43:25)
azk:     at tryCatch (/usr/local/Cellar/azk/0.12.1/node_modules/babel-runtime/regenerator/runtime.js:60:40)
azk:     at GeneratorFunctionPrototype.invoke (/usr/local/Cellar/azk/0.12.1/node_modules/babel-runtime/regenerator/runtime.js:205:22)
gullitmiranda commented 9 years ago

@cirdes,

As I am redoing the whole cli of azk(issue #382), I have to fix this.

gullitmiranda commented 9 years ago

I made a mistake.

This error is related to migration of VM an old version of azk: https://github.com/azukiapp/azk/blob/master/src/agent/migrations.js#L38-L44

What should be happening is that the file /etc/resolver/azk.dev existed, but not the VM. And that may not be being checked.

As my current task is not related, I'll leave that open, someone on the team (or even I) will resolve there.