sunflowerit / waftlib

Apache License 2.0
7 stars 14 forks source link

[ADD] correct error message #15

Closed gfcapalbo closed 2 years ago

gfcapalbo commented 2 years ago

Change in the error message.

Example: I am in /home/gcapalbo/k240/icapps16/w16

i execute command ./bootstrap

Before: ERROR: /home/gcapalbo/k240/icapps16/bootstrap files does not have 'LIBRARIES_VERSION_BRANCH' variable! update it by this command: /usr/bin/curl https://raw.githubusercontent.com/sunflowerit/waft/master/bootstrap -o /home/gcapalbo/k240/icapps16/bootstrap after ERROR: /home/gcapalbo/k240/icapps16/w16/bootstrap files does not have 'LIBRARIES_VERSION_BRANCH' variable! update it by this command: /usr/bin/curl https://raw.githubusercontent.com/sunflowerit/waft/master/bootstrap -o /home/gcapalbo/k240/icapps16/w16/bootstrap

Hussam-Suleiman commented 2 years ago

@gfcapalbo image what command did you use to get this error?

Regards!

gfcapalbo commented 2 years ago

@gfcapalbo image what command did you use to get this error?

Regards!

@Hussam-Suleiman added it first message.

Hussam-Suleiman commented 2 years ago

@gfcapalbo

I sent a screenshot to you, and I read the code many times, it is simple and the error message should have the correct path

as you see the 'error message' code inside /home/gcapalbo/k240/icapps16/w16/waftlib/bootstrap, so, $SCRIPT_PATH should return /home/gcapalbo/k240/icapps16/w16/waftlib then https://github.com/sunflowerit/waftlib/blob/master/bootstrap#L6 $ODOO_WORK_DIR/bootstrap will return /home/gcapalbo/k240/icapps16/w16/bootstrap so, how you get this error in your side? did you copy /home/gcapalbo/k240/icapps16/w16/waftlib/bootstrap to /home/gcapalbo/k240/icapps16/w16/bootstrap then you ran it?

gfcapalbo commented 2 years ago

@Hussam-Suleiman I started a new WAFT 16 project, cloned the repo:

(.venv) gcapalbo@freya ~/k240/icapps_16 (master)*$  ./bootstrap
ERROR: /home/gcapalbo/k240/bootstrap files does not have 'LIBRARIES_VERSION_BRANCH' variable! update it by this command:
  /usr/bin/curl https://raw.githubusercontent.com/sunflowerit/waft/master/bootstrap -o /home/gcapalbo/k240/bootstrap

as you can see the error message should be not: " -o /home/gcapalbo/k240/bootstrap" but -o /home/gcapalbo/k240/icapps_16/bootstrap because we want to put bootstrap in the folder we cloned, not the parent (see also my prompt: (.venv) gcapalbo@freya ~/k240/icapps_16 (master)*$

gfcapalbo commented 2 years ago

/home/gcapalbo/k240/icapps16/w16/waftlib/bootstrap to /home/gcapalbo/k240/icapps16/w16/bootstrap then you ran it?

           no i didn't but curl is basically the same thing... the waft works well, just the error message has the wrong path. A minor detail, but it may confuse beginners.
Hussam-Suleiman commented 2 years ago

@gfcapalbo from where did you clone the new project? from https://github.com/sunflowerit/waftlib or from https://github.com/sunflowerit/waft repository?

Hussam-Suleiman commented 2 years ago

@gfcapalbo could you confirm from where you clone the new project?

gfcapalbo commented 2 years ago

@Hussam-Suleiman

project comes from https://github.com/sunflowerit/waftlib

Hussam-Suleiman commented 2 years ago

@gfcapalbo ah that was the problem, you should clone the new project from https://github.com/sunflowerit/waft

gfcapalbo commented 2 years ago

Oh. all clear. will do that next time.